Skip to content

GitSafeBot/gitsafe-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gitsafe

CLI for GitSafe — manage soul-bound SafeVaults on Solana, bounty projects, and AI agent tools from your terminal.

Install

npm install -g gitsafe 
# or
pnpm add -g gitsafe

Requires Node.js 18+.


Quick start

# Authenticate with GitHub
gitsafe auth login

# Check vault balances
gitsafe balance

# Deposit tokens
gitsafe deposit 50 USDC

# Withdraw to Solana wallet
gitsafe withdraw 50 USDC YourSolanaWalletAddress

# Swap via Jupiter aggregator
gitsafe swap 50 USDC SOL

# Send to another contributor
gitsafe send 20 USDC @alice

Commands

  AUTH
    auth login                  GitHub OAuth · opens browser
    auth logout / me            Sign out / show current user

  VAULT
    balance                     Live SafeVault balances (USD value)
    deposit <amt> <token>       Lock tokens into vault (gitShield)
    withdraw <amt> <tok> <addr> Withdraw to Solana wallet (gitUnshield)
    swap <amt> <from> <to>      Swap via Jupiter aggregator (gitSwap)
    send <amt> <tok> <@user>    Send to contributor vault (2-step)
    vault deploy                Deploy SafeVault PDA on Solana (one-time)
    vault key                   Export execution keypair (emergency)

  PROJECTS
    projects list               List all projects
    projects create             Create on-chain project with budget
    projects show <id>          Show project + tasks
    projects task add           Assign bounty to GitHub issue
    projects task cancel        Cancel task, reclaim bounty

  IDENTITY (DID)
    did new                     Generate Ed25519 DID keypair
    did show                    Show current local DID
    did reset                   Delete stored DID

  MCP SERVER
    mcp serve                   Start stdio MCP server for Claude/AI agents
    mcp tools                   List all MCP tools
    mcp config                  Print claude_desktop_config.json snippet
    mcp install                 Auto-install into Claude Desktop app

  AGENT
    agent run [task]            Spawn OpenClaude agent with GitSafe context
    agent setup                 Install dependencies
    agent profile               Write .openclaude-profile.json
    agent info                  Show integration status

  HISTORY
    txs                         Transaction history
    repos                       Connected GitHub repos
    stats                       Platform-wide stats

Authentication

GitSafe uses GitHub OAuth. After running gitsafe auth login, your session is saved to ~/.gitsafe/session.json (mode 0600).

On a VPS / headless server:

gitsafe auth login
# → copy the URL, open in your local browser, complete OAuth
# → open DevTools → Application → Cookies → copy connect.sid value
gitsafe auth set-cookie "connect.sid=<value>"

MCP — Claude & AI Agent integration

The gitsafe mcp serve command exposes all vault, project, and identity operations as Model Context Protocol tools.

Add to Claude Desktop (claude_desktop_config.json):

{
  "mcpServers": {
    "gitsafe": {
      "command": "gitsafe",
      "args": ["mcp", "serve"]
    }
  }
}

Or generate automatically:

gitsafe mcp config    # print snippet
gitsafe mcp install   # auto-install into Claude Desktop

Environment variables

Variable Description
GITSAFE_API_URL Override API base URL (default: https://trygitsafe.xyz)
GITLAWB_NODE Gitlawb node URL
GITLAWB_DID Your DID identifier

Session & data files

Path Description
~/.gitsafe/session.json Auth session cookie (0600)
~/.gitsafe/config.json CLI config (apiUrl override)
~/.gitsafe/did/identity.json DID keypair (0600)
~/.gitsafe/claude-mcp-config.json Saved MCP config for Claude

Links

License

MIT

About

Gitsafe gitsafe-cli

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors