Local Development
Prerequisites
Section titled “Prerequisites”- Deno 2.x — for running the engine locally and tests
- Docker 20+ — for building container images
- kubectl 1.28+ — configured for cluster access
- Go 1.22+ — only if building
tntcfrom source
1. Install the CLI
Section titled “1. Install the CLI”# Recommended: install scriptcurl -fsSL https://raw.githubusercontent.com/randybias/tentacular/main/install.sh | shtntc versionOr build from source:
git clone git@github.com:randybias/tentacular.gitcd tentacularmake install # builds with version info, installs to ~/.local/bin/tntc version2. Initialize the Workspace
Section titled “2. Initialize the Workspace”Tentacular uses ~/tentacles/ as the default workspace for tentacle projects:
# Initialize the workspace (creates ~/tentacles with .secrets/ and .gitignore)tntc init-workspace
# Or specify a custom locationtntc init-workspace /path/to/my/workspaceThis creates:
~/tentacles/├── .secrets/ # Shared secrets pool (for all tentacles)└── .gitignore # Auto-generated: ignores .secrets.yaml, scratch/, .secrets/3. Configure Your Environment
Section titled “3. Configure Your Environment”# Set project-level defaultstntc configure --registry ghcr.io/yourorg --default-namespace dev --project
# This creates .tentacular/config.yaml and profiles your clusterSee Cluster Configuration for the full config reference.
4. Scaffold a Tentacle
Section titled “4. Scaffold a Tentacle”cd ~/tentaclestntc init my-tentaclecd my-tentacleOr use a scaffold:
cd ~/tentaclestntc scaffold init word-counter my-tentacle --no-paramscd my-tentacle5. Local Dev Server
Section titled “5. Local Dev Server”# Start with hot-reloadtntc dev
# In another terminal, trigger executioncurl -X POST http://localhost:8080/run -d '{"key": "value"}'
# Check healthcurl http://localhost:8080/healthcurl http://localhost:8080/health?detail=1The dev server watches for file changes and reloads automatically.
6. Set Up Secrets
Section titled “6. Set Up Secrets”tntc secrets init# Edit .secrets.yaml with your valuestntc secrets check7. Run Tests
Section titled “7. Run Tests”# Test individual nodes against fixturestntc test
# Test the full pipelinetntc test --pipeline8. Validate
Section titled “8. Validate”tntc validateVerification
Section titled “Verification”tntc devstarts without errorscurl localhost:8080/healthreturns{"status":"ok"}tntc testpasses all fixturestntc validatereports no errors
Workspace and Project Structure
Section titled “Workspace and Project Structure”~/tentacles/ # Workspace root├── .secrets/ # Shared secrets pool│ ├── slack # Used by multiple tentacles│ └── github├── .gitignore # Auto-generated├── my-tentacle/ # A tentacle project│ ├── workflow.yaml # Tentacle definition│ ├── nodes/ # TypeScript node files│ │ ├── fetch-data.ts│ │ └── process.ts│ ├── tests/│ │ └── fixtures/ # Test fixtures per node│ │ ├── fetch-data.json│ │ └── process.json│ ├── .secrets.yaml # Local secrets (gitignored)│ ├── .secrets.yaml.example # Secrets template (committed)│ └── scratch/ # Temporary files (gitignored)└── uptime-prober/ # Another tentacle └── ...Workspace-level shared secrets (.secrets/) are referenced from individual tentacles via $shared.<name> in their .secrets.yaml.
Troubleshooting
Section titled “Troubleshooting”| Symptom | Cause | Fix |
|---|---|---|
deno: command not found | Deno not installed | Install from https://deno.land |
| Hot-reload not working | File watcher issue | Restart tntc dev |
| Port 8080 in use | Another process on port | Kill the process or use --port flag |
| Import errors in nodes | Missing import map | Ensure deno.json exists in engine directory |