Help us shape the future of Go! Take the 2026 Go Developer Survey

cli

module
v0.2.37 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 14, 2026 License: MIT

README

ToGO

togo CLI

The togo command — a Laravel-artisan-like CLI for the togo framework.

Install

npm (downloads the prebuilt binary for your platform):

npm install -g @togo-framework/cli

npm 11: the binary is fetched by a postinstall script, and npm 11 gates install scripts behind allowScripts. By default it only warns (not yet covered by allowScripts); with strict-allow-scripts or --ignore-scripts the script is skipped and no binary is installed. Allow it explicitly:

npm install -g --allow-scripts=@togo-framework/cli @togo-framework/cli
# or once, for every future global install:
npm config set allow-scripts=@togo-framework/cli --location=user

Or skip npm: use go install (below) or grab a binary from GitHub releases.

Linux / macOS

curl -fsSL https://raw.githubusercontent.com/togo-framework/cli/main/install.sh | sh

Windows (PowerShell)

irm https://raw.githubusercontent.com/togo-framework/cli/main/install.ps1 | iex

With Go (note the /cmd/togo path — it's what makes the binary togo):

go install github.com/togo-framework/cli/cmd/togo@latest

Update

curl -fsSL https://raw.githubusercontent.com/togo-framework/cli/main/update.sh | sh   # Linux/macOS
irm https://raw.githubusercontent.com/togo-framework/cli/main/update.ps1 | iex        # Windows

Commands

Project      togo new <app> · togo dev · togo serve · togo web · togo version · togo upgrade
Make         togo make:resource <Name> <field:type...>   (model, sqlc, Atlas schema, GraphQL, REST, seeder, page)
             togo make:model · make:controller · make:action · make:view · make:plugin
Codegen      togo generate   (sqlc → gqlgen → Atlas diff/migrate → OpenAPI export)
             togo stub:publish
Quality      togo format · togo lint · togo test
Marketplace  togo install <owner/repo | agent:<name> | skill:<name> | claude> · togo install --list · togo plugin:list
Deploy       togo deploy [env]
AI / MCP     togo mcp:install · togo mcp:serve · togo agent <description>
Diagnostics  togo doctor    (checks &amp; auto-installs Go, Node/npm, sqlc, atlas)
Infra        togo infra:init <provider>

togo new and the generators auto-install any missing toolchain (Go, Node/npm, sqlc, atlas); run togo doctor any time to check or repair them.

Install — plugins, agents & skills

Everything in the togo marketplace installs with one command:

togo install togo-framework/auth     # a plugin (Go capability) — go get + auto-register
togo install agent:togo-backend      # an AI agent  → .claude/agents/togo-backend.md
togo install skill:resource          # a skill       → .claude/commands/resource.md
togo install claude                  # the togo Claude Code plugin (15-agent team + auto-wired MCP)
togo install --list                  # list every installable plugin, agent and skill

Agents and skills are sourced from the togo Claude Code plugin and dropped into your project's .claude/ so Claude Code picks them up immediately.

Deploy

togo deploy ships a togo app to your server fast — build locally, rsync the artifact (scp fallback), and run a restart command over SSH. Config lives in togo.yaml:

deploy:
  host: 203.0.113.10
  user: deploy
  path: /opt/myapp
  restart: systemctl restart myapp        # run over SSH after upload
  # optional: port · ssh_key · build · binary · goos · goarch · remote_build
  # include: [".env.production.example"]   # extra paths --remote-build may ship
  # multi-environment instead of the inline target:
  # default: production
  # targets:
  #   production: { host: …, user: …, path: …, restart: … }
  #   staging:    { host: …, user: …, path: …, restart: … }
togo deploy                  # the inline target (or deploy.default)
togo deploy staging          # a named target
togo deploy --dry-run        # print the plan, change nothing
togo deploy --remote-build   # rsync source and build on the server

--remote-build ships the source tree but never .env, .env.* (except .env.example), .git/, local database files (*.db, *.sqlite, -wal/-shm), node_modules/ or .togo/, and it honours .gitignore. Use deploy.include to opt a path back in. It requires rsync (the scp fallback is refused for remote builds because it cannot exclude files). --dry-run lists the exclusions.

Env overrides: TOGO_DEPLOY_HOST / _USER / _PATH / _SSH_KEY.

Generators

togo make:resource Post title:string body:text:nullable published:bool emits per-resource fragments across six targets plus regenerated route/resolver registries, all driven by togo.resources.yaml. Field types: string, text, int, bool, float, decimal, uuid, time, date, json; append :nullable (or a quoted ?) to make a field optional. Flags: --dry-run, --force.

CLI is plugin-extensible

Any executable named togo-<cmd> on PATH or in ~/.togo/bin becomes togo <cmd> (git/kubectl-style), and togo install owner/repo registers plugin commands.

License

MIT


💎 Premium sponsors

togo is proudly sponsored by ID8 Media and One Studio.

ID8 Media        One Studio

Plugin assets — .claude/ + frontend (injected on install)

togo install <owner>/<repo> injects a plugin's project-side assets into your app:

  • .claude/ — any agents/, skills/ (or commands/), hooks/, rules/ the plugin ships are copied into your project's .claude/ so Claude Code picks them up next session.
  • frontend — pages/components are injected into your web/ (the app's frontend dir).

Existing project files are kept (merge); pass --force to overwrite. A plugin declares these in togo.plugin.yaml (claude: .claude, frontend.dir: web) or they're auto-detected.

Directories

Path Synopsis
cmd
togo command
Command togo is the CLI for the togo framework — a Laravel-artisan-like developer experience for the Go + sqlc + Atlas + GraphQL/OpenAPI + Next.js stack.
Command togo is the CLI for the togo framework — a Laravel-artisan-like developer experience for the Go + sqlc + Atlas + GraphQL/OpenAPI + Next.js stack.
internal
config
Package config loads and represents a togo project's configuration (togo.yaml) and the resource manifest (togo.resources.yaml) that drives code generation.
Package config loads and represents a togo project's configuration (togo.yaml) and the resource manifest (togo.resources.yaml) that drives code generation.
scaffold
Package scaffold renders a new togo project from the create-togo-app template.
Package scaffold renders a new togo project from the create-togo-app template.
templates
Package templates embeds the per-artifact generator stubs and resolves them, preferring per-project overrides published to ./.togo/stubs (artisan parity).
Package templates embeds the per-artifact generator stubs and resolves them, preferring per-project overrides published to ./.togo/stubs (artisan parity).
toolchain
Package toolchain ensures the external tools togo needs — Go, Node/npm, sqlc, atlas — are present, installing any that are missing into ~/.togo/toolchain and putting them on PATH for the current process (and child exec.Commands).
Package toolchain ensures the external tools togo needs — Go, Node/npm, sqlc, atlas — are present, installing any that are missing into ~/.togo/toolchain and putting them on PATH for the current process (and child exec.Commands).
ui
Package ui provides minimal, dependency-free colored terminal output for the CLI.
Package ui provides minimal, dependency-free colored terminal output for the CLI.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL