cli

command module
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2026 License: MIT Imports: 4 Imported by: 0

README

instant CLI

Zero-friction infrastructure CLI for instanode.dev.

Install

Pre-built binaries for darwin / linux × amd64 / arm64 (the curl-pipe-sh script auto-detects your platform):

curl -sSfL https://instanode.dev/install.sh | sh

The installer downloads the latest release archive from GitHub Releases, verifies its SHA-256 against the signed checksums.txt, and drops the binary at /usr/local/bin/instant. Set INSTANT_INSTALL_DIR=$HOME/.local/bin to avoid sudo; set INSTANT_VERSION=v0.2.0 to pin a specific release.

Or, with a Go toolchain already installed:

go install github.com/InstaNode-dev/cli@latest

Windows users: download the .zip from the releases page and add instant.exe to your PATH.

Usage

Every provisioning command requires a --name flag. The name must be 1–64 characters and match ^[A-Za-z0-9][A-Za-z0-9 _-]*$; omitting it is rejected both locally and by the API (HTTP 400).

instant db new --name app-db          # Provision a Postgres database
instant cache new --name app-cache    # Provision a Redis cache
instant nosql new --name app-docs     # Provision a MongoDB document store
instant queue new --name app-jobs     # Provision a NATS JetStream queue
instant resources                     # List your provisioned resources (requires login)
instant status                        # Show locally tracked resources
instant login                         # Log in to your instanode.dev account
instant whoami                        # Show current account
Authentication

instant login runs a browser device-flow and saves your credentials to ~/.instant-config. If that flow times out, or you're on a headless box, skip it entirely with a Personal Access Token: mint one at instanode.dev/app/settings, then authenticate any command in one of two ways:

instant --token <pat> resources      # per-invocation flag (highest priority)
export INSTANT_TOKEN=<pat>           # environment variable for the session
instant resources

Resolution order is --token flag → INSTANT_TOKEN env var → saved instant login credentials. Both PAT paths skip the browser entirely, so they're the recommended auth for CI and agent scripts.

Targeting an environment

Every new verb accepts an optional --env flag that the API honors (default: development; CLAUDE.md rule 11):

instant db new --name app-db --env production
instant cache new --name app-cache --env staging

The response prints both the resolved env and — when the server downgraded a request (e.g. anonymous caller asking for production) — an env_override_reason line explaining why.

Multi-service stacks

instant stack new is a CLI follow-up — not shipped yet. For multi-service stacks today, use either the MCP create_stack tool (Claude Code, Cursor, any MCP client) or a direct POST /stacks/new call against the API. The request schema lives at https://api.instanode.dev/openapi.json.

Single-service deploys via the CLI are also still a follow-up — instant deploy --help prints the canonical MCP/curl paths.

Build from source

go build -o bin/instant .

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal
cliconfig
Package cliconfig manages the user's CLI credentials in ~/.instant-config.
Package cliconfig manages the user's CLI credentials in ~/.instant-config.
secretstore
Package secretstore provides a pluggable backend for storing the user's CLI bearer token.
Package secretstore provides a pluggable backend for storing the user's CLI bearer token.
tokens
Package tokens manages the local ~/.instant-tokens file that persists provisioned resource tokens between CLI invocations.
Package tokens manages the local ~/.instant-tokens file that persists provisioned resource tokens between CLI invocations.

Jump to

Keyboard shortcuts

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