open source is social v-it.org
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix stale loadEnv import in ship/skim, update help text and CLAUDE.md

- Replace dead `loadEnv` import (from deleted env.js) with `loadConfig` from config.js in ship.js and skim.js, matching the pattern already used by firehose.js

- Update --did option help text to reflect config-based DID resolution

- Add Verification section to CLAUDE.md with pre-commit testing notes

+11 -6
+5
CLAUDE.md
··· 30 30 - **DRY, KISS** - Extract common logic, prefer simple solutions. 31 31 - **Fail fast** - Validate inputs and external state early. Clear error messages. 32 32 33 + ## Verification 34 + 35 + - Always run `make test` before committing — all tests must pass. 36 + - Hand-test affected CLI commands (`./bin/vit.js <command>`) to verify behavior beyond what tests cover. 37 + 33 38 ## Hosting 34 39 35 40 The `docs/` directory is published to [v-it.org](https://v-it.org) via GitHub Pages. Pushing to main auto-deploys.
+3 -3
src/cmd/ship.js
··· 3 3 4 4 import { Agent } from '@atproto/api'; 5 5 import { TID } from '@atproto/common-web'; 6 - import { loadEnv } from '../lib/env.js'; 6 + import { loadConfig } from '../lib/config.js'; 7 7 import { createOAuthClient, createSessionStore } from '../lib/oauth.js'; 8 8 import { appendLog } from '../lib/vit-dir.js'; 9 9 ··· 11 11 program 12 12 .command('ship <text>') 13 13 .description('Write a cap to the authenticated PDS') 14 - .option('--did <did>', 'DID to use (default: from .env)') 14 + .option('--did <did>', 'DID to use (reads saved DID from config if not provided)') 15 15 .action(async (text, opts) => { 16 16 try { 17 - const { BSKY_DID: envDid } = loadEnv(); 17 + const envDid = loadConfig().did; 18 18 const did = opts.did || envDid; 19 19 20 20 const clientId = `http://localhost?redirect_uri=${encodeURIComponent('http://127.0.0.1')}&scope=${encodeURIComponent('atproto transition:generic')}`;
+3 -3
src/cmd/skim.js
··· 2 2 // Copyright (c) 2026 sol pbc 3 3 4 4 import { Agent } from '@atproto/api'; 5 - import { loadEnv } from '../lib/env.js'; 5 + import { loadConfig } from '../lib/config.js'; 6 6 import { createOAuthClient, createSessionStore } from '../lib/oauth.js'; 7 7 8 8 export default function register(program) { 9 9 program 10 10 .command('skim') 11 11 .description('List caps from the authenticated PDS') 12 - .option('--did <did>', 'DID to use (default: from .env)') 12 + .option('--did <did>', 'DID to use (reads saved DID from config if not provided)') 13 13 .option('--limit <n>', 'Max records to return', '25') 14 14 .action(async (opts) => { 15 15 try { 16 - const { BSKY_DID: envDid } = loadEnv(); 16 + const envDid = loadConfig().did; 17 17 const did = opts.did || envDid; 18 18 19 19 const clientId = `http://localhost?redirect_uri=${encodeURIComponent('http://127.0.0.1')}&scope=${encodeURIComponent('atproto transition:generic')}`;