infisical-init

infisical-init is a command for Claude Code from smicolon/ai-kit. It costs 27 tokens per session (870 once invoked), scanned B, original, MIT.

A command for starting Infisical secret management in a project, including installing the CLI, choosing cloud or self-hosted use, signing in, and setting up project files.

In plain words
What is it for?
Use it to connect a project to Infisical, configure its environment, authenticate, and update the project’s ignore rules.
Why use it?
It guides the initial setup needed to keep configuration secrets outside the codebase and avoid committing local secret files.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: names the AskUserQuestion tool.

Good fit Use it to connect a project to Infisical, configure its environment, authenticate, and update the project’s ignore rules.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/smicolon/ai-kit/infisical-init
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/smicolon/ai-kit

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for infisical-init

README.md
[![agentmods](https://agentmods.dev/badge/commands/smicolon/ai-kit/infisical-init/github.svg)](https://agentmods.dev/commands/smicolon/ai-kit/infisical-init)
Your own site
<a href="https://agentmods.dev/commands/smicolon/ai-kit/infisical-init"><img src="https://agentmods.dev/badge/commands/smicolon/ai-kit/infisical-init/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for infisical-init

Your own site · 80×15
<a href="https://agentmods.dev/commands/smicolon/ai-kit/infisical-init"><img src="https://agentmods.dev/badge/commands/smicolon/ai-kit/infisical-init.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 27 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 870 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 2 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00027 $0.00870
Opus 5 $0.00014 $0.00435
Sonnet 5 $0.00005 $0.00174
Haiku 4.5 $0.00003 $0.00087

Measured 6d ago against content hash d0d091675f75, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade B, and why

infisical-init scanned grade B with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

curl -1sLf 'https://dl.cloudsmith.io/public/infisical/infisical-cli/setup.deb.sh' | sudo -E bash

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -1sLf 'https://dl.cloudsmith.io/public/infisical/infisical-cli/setup.deb.sh' | sudo -E bash
packs/infisical/commands/infisical-init.md · 141 lines

How it starts

The opening of the file, as written. The whole thing — 141 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Infisical Init Command

Initialize Infisical secret management for the current project.

Parse Arguments

Extract from user input:

  • mode: cloud or self-hosted (default: ask user)

Gather Information

Step 1: Check CLI Installation

# Check if infisical CLI is installed
which infisical && infisical --version

If not installed, provide installation instructions:

# macOS
brew install infisical/get-cli/infisical

# Linux (Debian/Ubuntu)
curl -1sLf 'https://dl.cloudsmith.io/public/infisical/infisical-cli/setup.deb.sh' | sudo -E bash
sudo apt-get update && sudo apt-get install -y infisical

# Linux (RPM)
curl -1sLf 'https://dl.cloudsmith.io/public/infisical/infisical-cli/setup.rpm.sh' | sudo -E bash
sudo yum install -y infisical

# npm (any platform)
npm install -g @infisical/cli

# Docker
docker pull infisical/cli

Ask user to install and confirm before proceeding.

Step 2: Determine Instance Type

Ask user:

  • Cloud: app.infisical.com (default) or EU region eu.infisical.com
  • Self-hosted: Custom domain (e.g., https://secrets.company.com)

Step 3: Authenticate

# Cloud (default)
infisical login

# Cloud (EU region)
infisical login --domain=https://eu.infisical.com

# Self-hosted
infisical login --domain=https://secrets.company.com

Step 4: Initialize Project

# Creates .infisical.json with workspace/project binding
infisical init

This will prompt the user to select their organization and project in the terminal.

Step 5: Verify Connection

# Test that secrets are accessible
infisical secrets --env=dev

Step 6: Generate .env.example

# Generate example env file with keys (no values)
infisical secrets generate-example-env --env=dev > .env.example

Step 7: Update .gitignore

Check and update .gitignore to include:

# Infisical
.env
.env.local
.env.*.local

# Keep .env.example committed
!.env.example

Do NOT add .infisical.json to .gitignore - it should be committed so team members can use the same workspace binding.

Read the full file on GitHub · 141 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 141 lines · 27 tokens per session scan B d0d091675f75

Subscribe to this mod's changes

infisical-init is a command published in the GitHub repository smicolon/ai-kit (6 stars, last pushed 6d ago), licensed MIT. It adds 27 tokens to every session and 870 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it B with 2 findings (asks for root, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.