{"_id":"@anmho/kalshi-cli","_rev":"2-3b4682d1bcf6d3f09baf87dabc739b8e","name":"@anmho/kalshi-cli","dist-tags":{"latest":"0.2.2"},"versions":{"0.2.0":{"name":"@anmho/kalshi-cli","version":"0.2.0","_id":"@anmho/kalshi-cli@0.2.0","maintainers":[{"name":"anmho","email":"andyminhtuanho@gmail.com"}],"homepage":"https://github.com/anmho/kalshi-cli#readme","bugs":{"url":"https://github.com/anmho/kalshi-cli/issues"},"bin":{"kalshi":"dist/index.js"},"dist":{"shasum":"9e820ae8ae189753b5fca08df4556c6cf6f44a99","tarball":"https://registry.npmjs.org/@anmho/kalshi-cli/-/kalshi-cli-0.2.0.tgz","fileCount":57,"integrity":"sha512-Yh4aR3ln/8iJm/KWVJrOPIgRsSg5BPOKdfurITgTfPOFhfyTvMQwvxUdzXfG/A61KtdV1fwmYOkqIsNMc7Toyw==","signatures":[{"sig":"MEUCIQCnmQ1t6CHc2cNtDE0ClYzz2ICi0BRnJhH/3tqOR/9v+wIgPugZ7NFZXz5IzOXygtGCofXdCjk7k98zw0AwD7Dwt6I=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":390165},"type":"module","gitHead":"5a4e2fcbf1f64e58926a9b74f5a84be12622f182","scripts":{"dev":"bun run src/index.ts","test":"bun test ./src/**/*.test.ts","build":"tsc -p tsconfig.build.json && tsc-alias -p tsconfig.build.json --resolve-full-paths && chmod +x dist/index.js","check":"tsc -p tsconfig.build.json --noEmit","release":"bun run check && bun run build && npm publish --access public --cache /tmp/npm-cache","docs:dev":"npm --prefix website run start","docs:build":"npm --prefix website run build","docs:validate":"npm --prefix website run build","test:commands":"bun run scripts/test-commands.ts","install:system":"bun run build && bun link","uninstall:system":"bun unlink","docs:sync-openapi":"curl -sSL https://docs.kalshi.com/openapi.yaml -o docs/openapi.yaml","test:commands:private":"bun run scripts/test-commands-private.ts"},"_npmUser":{"name":"anmho","email":"andyminhtuanho@gmail.com"},"repository":{"url":"git+https://github.com/anmho/kalshi-cli.git","type":"git"},"_npmVersion":"11.9.0","description":"Curated terminal-first CLI for Kalshi using the official TypeScript SDK","directories":{},"_nodeVersion":"24.14.0","dependencies":{"zod":"^4.3.6","dotenv":"^16.6.1","columnify":"^1.6.0","commander":"^14.0.3","kalshi-typescript":"^3.12.0"},"_hasShrinkwrap":false,"devDependencies":{"tsc-alias":"^1.8.16","@types/bun":"^1.3.12","typescript":"^5.9.3","@types/node":"^25.6.0","@types/columnify":"^1.5.4"},"_npmOperationalInternal":{"tmp":"tmp/kalshi-cli_0.2.0_1777363957259_0.7496148456578073","host":"s3://npm-registry-packages-npm-production"}},"0.2.2":{"name":"@anmho/kalshi-cli","version":"0.2.2","description":"Curated terminal-first CLI for Kalshi using the official TypeScript SDK","license":"MIT","repository":{"type":"git","url":"git+https://github.com/anmho/kalshi-cli.git"},"homepage":"https://github.com/anmho/kalshi-cli#readme","bugs":{"url":"https://github.com/anmho/kalshi-cli/issues"},"type":"module","bin":{"kalshi":"dist/index.js"},"scripts":{"dev":"bun run src/index.ts","build":"tsc -p tsconfig.build.json && tsc-alias -p tsconfig.build.json --resolve-full-paths && chmod +x dist/index.js","check":"tsc -p tsconfig.build.json --noEmit","test":"bun test ./src/**/*.test.ts","install:system":"bun run build && bun link","uninstall:system":"bun unlink","test:commands":"bun run scripts/test-commands.ts","test:commands:private":"bun run scripts/test-commands-private.ts","docs:sync-openapi":"curl -sSL https://docs.kalshi.com/openapi.yaml -o docs/openapi.yaml","docs:dev":"npm --prefix website run start","docs:build":"npm --prefix website run build","docs:validate":"npm --prefix website run build","release":"bun run check && bun run build && npm publish --access public --cache /tmp/npm-cache"},"devDependencies":{"@types/bun":"^1.3.12","@types/columnify":"^1.5.4","@types/node":"^25.6.0","tsc-alias":"^1.8.16","typescript":"^5.9.3"},"dependencies":{"columnify":"^1.6.0","commander":"^14.0.3","dotenv":"^16.6.1","kalshi-typescript":"^3.12.0","zod":"^4.3.6"},"gitHead":"5ba31f792fc19690a9ca68767408c5321ef488cb","_id":"@anmho/kalshi-cli@0.2.2","_nodeVersion":"24.14.1","_npmVersion":"11.11.0","dist":{"integrity":"sha512-qPpr8BWjCrBPtXqYzvy040o3/6a9iHjjSUggfotvKwP7H/yhGJU0uUYunO3mCq4DKf6JZIvN2KFHG12A3ISnwg==","shasum":"96f658695ded5e815dd902f2408f28e7ccc71deb","tarball":"https://registry.npmjs.org/@anmho/kalshi-cli/-/kalshi-cli-0.2.2.tgz","fileCount":57,"unpackedSize":390185,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@anmho%2fkalshi-cli@0.2.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQC4qUrDmgfo+fi73tx7CQJhiICtALH5ozBtUsUWh3aStQIhAL6pytlEIv1TmVSp7zYo+TPnYB9zvuN6dR7QDXPCK5p2"}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:a111f73a-14fe-4534-963b-e07c54ce2877"}},"directories":{},"maintainers":[{"name":"anmho","email":"andyminhtuanho@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/kalshi-cli_0.2.2_1777366416423_0.6647784664073653"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-28T08:12:37.154Z","modified":"2026-04-28T08:53:36.817Z","0.2.0":"2026-04-28T08:12:37.432Z","0.2.2":"2026-04-28T08:53:36.554Z"},"bugs":{"url":"https://github.com/anmho/kalshi-cli/issues"},"homepage":"https://github.com/anmho/kalshi-cli#readme","repository":{"type":"git","url":"git+https://github.com/anmho/kalshi-cli.git"},"description":"Curated terminal-first CLI for Kalshi using the official TypeScript SDK","maintainers":[{"name":"anmho","email":"andyminhtuanho@gmail.com"}],"readme":"# kalshi-cli\n\nTerminal-first Kalshi CLI built on the official TypeScript SDK (`kalshi-typescript`).\n\nnpm package: `@anmho/kalshi-cli`\n\nOfficial references:\n\n- Kalshi docs: <https://docs.kalshi.com/>\n- TypeScript SDK quickstart: <https://docs.kalshi.com/sdks/typescript/quickstart>\n- API keys/auth: <https://docs.kalshi.com/getting_started/api_keys>\n- Hosted CLI docs (Docusaurus): <https://anmho.github.io/kalshi-cli/>\n\n## Install\n\n```bash\nbun install\nbun run build\n```\n\nLocal binary:\n\n```bash\n./dist/index.js --help\n```\n\nInstall globally on your machine:\n\n```bash\nbun run install:system\nkalshi --help\n```\n\nInstall from npm:\n\n```bash\nnpm install -g @anmho/kalshi-cli\nkalshi --help\n```\n\n## Authentication\n\nKalshi API auth uses API Key ID + RSA private key signing (no OAuth in current official docs).\n\nLocal `.env` (recommended for development):\n\n```bash\ncp .env.example .env\n```\n\nEnvironment variables:\n\n```bash\nexport KALSHI_API_KEY_ID=\"your-key-id\"\nexport KALSHI_PRIVATE_KEY_PATH=\"$HOME/.kalshi/kalshi-key.pem\"\nexport KALSHI_BASE_URL=\"https://api.elections.kalshi.com/trade-api/v2\"\nexport KALSHI_TIMEOUT_MS=\"10000\"\n```\n\nOr persist in CLI config:\n\n```bash\nkalshi config set apiKeyId your-key-id\nkalshi config set privateKeyPath \"$HOME/.kalshi/kalshi-key.pem\"\nkalshi config set baseUrl https://api.elections.kalshi.com/trade-api/v2\nkalshi config show\n```\n\nPrecedence: `CLI flags > environment (.env) > config file > defaults`.\n\n## Quickstart\n\nPublic endpoints (no credentials required):\n\n```bash\nkalshi ping\nkalshi exchange status\nkalshi events list --limit 10\nkalshi markets list --limit 10\n```\n\nPrivate endpoints (credentials required):\n\n```bash\nkalshi portfolio balance\nkalshi orders list --limit 20\nkalshi account limits\nkalshi portfolio settlements --limit 20\nkalshi orders queue-positions\n```\n\n## Output Modes\n\n- Default table: human-readable columns\n- Wide table: `-o wide`\n- JSON: `--json` or `-o json`\n\nExamples:\n\n```bash\nkalshi markets list --limit 5\nkalshi markets list --limit 5 -o wide\nkalshi markets list --limit 5 --json\n```\n\nTypical default table:\n\n```text\nTICKER                   EVENT                STATUS LAST   YES_BID YES_ASK VOLUME\nKX...                    KX...                active 0.0000 0.0000  0.0000  0.00\n```\n\nTypical wide table:\n\n```text\nTICKER ... OPEN_INTEREST CLOSE_TIME           TITLE\nKX...      0.00          2026-04-16T14:00:00Z yes ...\n```\n\nJSON output:\n\n```bash\nkalshi markets list --limit 2 --json\n```\n\n## Commands\n\n- `config`: local config management\n- `doctor`: local config + connectivity checks\n- `ping`: exchange reachability\n- `exchange`: status, schedule, announcements\n- `events`: list/get\n- `markets`: list/get/orderbook/trades\n- `orders`: list/get/create/cancel/amend/decrease/queue-position/queue-positions/batch-create/batch-cancel\n- `portfolio`: balance/positions/fills/settlements/resting-order-value/subaccounts\n- `account`: API limits\n\nEach subcommand description includes the mapped endpoint (for example `GET /markets`).\n\n## Docs\n\nDocusaurus docs + API reference are in `website/`.\n\n```bash\nbun run docs:sync-openapi\nbun run docs:dev\n```\n\nBuild docs:\n\n```bash\nbun run docs:build\n```\n\nDeploy docs:\n\n- GitHub Actions workflow: `.github/workflows/docs-pages.yml`\n- Published URL: <https://anmho.github.io/kalshi-cli/>\n\n## Validation\n\n```bash\nbun run check\nbun run build\nbun run test:commands\nbun run test:commands:private\n```\n","readmeFilename":"README.md","license":"MIT"}