### Go Install from GitHub (Fish Shell) Source: https://context7.com/nikivdev/config/llms.txt Installs Go packages directly from GitHub repositories using `go install`. Useful for quickly installing tools or libraries. ```fish # Go — install from GitHub mi nikivdev/somerepo # Runs: go install github.com/nikivdev/somerepo/...@latest ``` -------------------------------- ### Bun Package Management and Build Shortcuts (Fish Shell) Source: https://context7.com/nikivdev/config/llms.txt Single-keystroke wrappers for Bun commands, including installation, updates, building, and development watch mode. Use for quick package management and build tasks. ```fish :i some-package # bun i some-package :id some-package # bun i -d some-package (dev dependency) :g some-package # bun i -g some-package (global) :u # bun update --latest :b # bun run build :w src/index.ts # bun --watch src/index.ts :d # full reset: rm -rf node_modules + bun i :c # same as :d (alias) :s # bun s :se # bun seed ``` ```fish pi # pnpm i pd # pnpm dev idev some-pkg # pnpm add -d some-pkg ``` ```fish # TypeScript check (no emit) ts. # bunx tsc --noEmit ``` -------------------------------- ### AI Session Management (Fish Shell) Source: https://context7.com/nikivdev/config/llms.txt Integrates AI tools like OpenAI Codex and Claude into the workflow. Functions allow opening, continuing, listing, and connecting to AI sessions. ```fish # j — open or continue a Codex session in the current directory j # open session for cwd j "fix login bug" # open session with query ``` ```fish # k — connect to an existing Codex session k # connect to latest session in cwd k "auth refactor" # connect to best-matching session k abc12345 # connect to session by ID prefix ``` ```fish # ks — list sessions for current directory ks ``` ```fish # K — open a new Claude session K ``` ```fish # o — copy Claude context to clipboard o ``` ```fish # jc — copy Codex context to clipboard jc ``` ```fish # C — run claude CLI directly C "explain this file" ``` ```fish # m — run opencode or hive explore m # → opencode m "how does auth work" # → hive explore "how does auth work" ``` -------------------------------- ### Rust Build and Test Shortcuts (Fish Shell) Source: https://context7.com/nikivdev/config/llms.txt Shortcuts for Rust development using `cargo watch` to automatically re-run tests or builds. Useful for continuous testing during development. ```fish # Rust — watch tests R # cargo watch -q -- cargo test -q --lib R my_test # cargo watch -q -- cargo test -q --lib -- my_test --nocapture rs # cargo watch -q -- cargo test -q --lib -- run --nocapture ``` -------------------------------- ### Process and Port Utilities (Fish Shell) Source: https://context7.com/nikivdev/config/llms.txt Functions for managing network ports and processes, including killing processes on a specific port, checking port usage, and cleaning up stale Electron development instances. ```fish # Kill all processes on a port killPort 3000 # Output: Killed process(es) on port 3000 ``` ```fish # Check what's running on a port portCheck 3000 # Output: (lsof table of processes) ``` ```fish # Kill stale Prom/Designer Electron dev processes killStaleElectron # Sends SIGTERM then SIGKILL to matching Electron processes ``` ```fish # Full cleanup of all local Electron dev processes cleanElectron # Kills all dev Electron instances across workspaces ``` -------------------------------- ### Fish Shell Flow Wrapper Function Source: https://context7.com/nikivdev/config/llms.txt The `f` function is the primary entry point to the Flow CLI, with smart subcommand pass-through and a `match` fallback for unknown tokens. The underlying binary is resolved from several candidate paths. ```fish # fish/config.fish — the f() wrapper (flow:start … flow:end block) # Pass explicit subcommands through directly: f tasks # list all flow tasks f setup # run setup task f ai # open AI interface f commit # commit via flow f deploy # deploy project f docs # open docs f status # project status # Anything not in the passthrough list is treated as a match query: f "some query" # → f match "some query" # The underlying binary is resolved from several candidate paths: # $HOME/bin/f-bin, $HOME/.flow/bin/f, $HOME/bin/f, $HOME/.local/bin/f ``` -------------------------------- ### Prettier Formatting (Fish Shell) Source: https://context7.com/nikivdev/config/llms.txt Formats all JavaScript, JSON, CSS, and TypeScript files in the project using Prettier. ```fish # Prettier format all prettierAll # bunx prettier --write "**/*.{js,json,css,tsx,ts}" ``` -------------------------------- ### Fish Shell Git Helpers Source: https://context7.com/nikivdev/config/llms.txt A collection of functions for common git operations, branch management, and fork/sync workflows. Includes quick commit-all, new branch creation, and rebasing onto main. ```fish # fish/fn.fish — git helpers # Quick commit-all with "." message and push g. # Output: [main abc1234] . # Create and switch to a new branch gb feature/my-feature # Output: ✔ Created and switched to branch 'feature/my-feature' # Rebase current branch onto origin/main (with autostash) gRebaseMain ``` -------------------------------- ### Zed Editor Settings Source: https://context7.com/nikivdev/config/llms.txt Configure Zed editor settings, including enabling vim-mode, setting the default terminal shell to fish, and configuring AI agents. This JSON file defines the core editor behavior and appearance. ```json // zed/settings.json — key settings { "vim_mode": true, "base_keymap": "VSCode", "terminal": { "dock": "right", "shell": { "with_arguments": { "program": "/usr/local/bin/fish", "args": ["-l"] } } }, "agent": { "default_model": { "provider": "zed.dev", "model": "claude-sonnet-4-latest" } }, "theme": { "mode": "system", "light": "One Light", "dark": "GitHub Dark" }, "languages": { "TypeScript": { "format_on_save": "on", "code_actions_on_format": { "source.fixAll.eslint": true } } } } ``` -------------------------------- ### Drizzle ORM Migrations (Fish Shell) Source: https://context7.com/nikivdev/config/llms.txt Commands to manage Drizzle ORM database migrations, including generating migration files and applying them. ```fish # Drizzle migrations dkm # bunx drizzle-kit migrate dkm generate # bunx drizzle-kit generate ``` -------------------------------- ### Configure Cursor Editor Settings Source: https://context7.com/nikivdev/config/llms.txt Use this JSON configuration for `cursor/settings.json` to customize editor appearance, behavior, and extensions. It includes theme selection, Vim mode enablement, font settings, format-on-save, AI command allowlist, and language-specific formatters. ```json // cursor/settings.json — selected highlights { "workbench.colorTheme": "GitHub Dark Default", "workbench.preferredLightColorTheme": "GitHub Light", "vim_mode": true, "vim.easymotion": true, "vim.leader": " ", "editor.fontSize": 15, "editor.fontLigatures": true, "editor.formatOnSave": true, // Amp AI agent — allowed shell commands "amp.commands.allowlist": ["pnpm", "cd", "bun", "chmod", "git", "rm", "stripe"], // Language-specific formatters "[typescript]": { "editor.defaultFormatter": "esbenp.prettier-vscode" }, "[json]": { "editor.defaultFormatter": "biomejs.biome" }, // Nix LSP "nix.enableLanguageServer": true, "nix.serverPath": "nil" } ``` -------------------------------- ### Fish Prompt for JJ Workspace Awareness Source: https://context7.com/nikivdev/config/llms.txt This Fish script overrides Pure Fish prompt internals to integrate with JJ workspaces. It displays JJ workspace names and suppresses certain indicators within Prom IDE directories to reduce noise. ```fish # fish/prompt_parallel_workspaces.fish # Sourced automatically from fish/config.fish when Pure is installed. # Detects JJ workspace name from ~/.jj/workspaces/// # and maps it to a display branch: # review/ → displayed as "review/!" (or ⧉ when in a workspace pane) # codex/ → displayed as "codex/!" # home branch → displayed as-is (no suffix) # Also suppresses dirty/stash/pending-commit indicators when inside Prom IDE dirs # to reduce noise during active Electron dev sessions. # Example prompt output for a review branch inside a JJ workspace: # ~/code/prom/ide/designer review/nikiv-designer-dev-deploy⧉ > # Functions exposed (override Pure internals): # _pure_prompt_git_branch — branch name + task badge # _pure_prompt_git_dirty — dirty indicator (suppressed in prom dirs) # _pure_prompt_git_stash — stash indicator (suppressed in prom dirs) # _pure_prompt_git_pending_commits — ahead/behind (diverged → ⇅N/M) ``` -------------------------------- ### Resolve Codex Sessions with TypeScript/Bun Source: https://context7.com/nikivdev/config/llms.txt Use this script to find and resume Codex sessions by natural-language query, ordinal, or UUID prefix. It queries the running `codex app-server` via JSON-RPC. The script supports options like `--print` to show metadata without resuming and `--repo` to specify a different repository path. ```typescript // fish/scripts/codex-openai-session.ts // Usage: bun codex-openai-session.ts [--print] [--repo ] [--limit ] // Find and resume the most recent session: // bun codex-openai-session.ts latest // // Find by keyword: // bun codex-openai-session.ts "auth refactor" // // Find by ordinal (2nd most recent): // bun codex-openai-session.ts second // bun codex-openai-session.ts 2 // // Find session after a given anchor: // bun codex-openai-session.ts "after auth refactor" // // Print session metadata without resuming: // bun codex-openai-session.ts --print "login bug" // Output: // { // "id": "3fa85f64-...", // "updatedAt": 1718000000, // "name": "Fix login bug", // "preview": "Looking at the auth middleware...", // "cwd": "/Users/nikiv/src/myapp" // } // // Use a different repo root: // bun codex-openai-session.ts --repo ~/src/myapp "recent work" // The script uses a two-pass ranking strategy: // Pass 1: Score threads by title, preview, git branch/sha, and id prefix matches. // Pass 2: If top scores are close, read full thread transcripts for deeper matching. const client = new CodexAppServerClient(repoPath) await client.initialize() const threads = await client.listThreads(100, "auth") // threads are sorted by updatedAt desc, filtered for non-ephemeral ``` -------------------------------- ### Fish Shell Navigation Aliases Source: https://context7.com/nikivdev/config/llms.txt Short single-letter aliases and functions provide rapid directory navigation with `eza` listing. Use `md` to create and change into a new directory. ```fish # fish/fn.fish — navigation aliases # Directory navigation (cd + eza listing) dc # → cd ~/config && eza da # → cd ~/src && eza dj # → cd ~/try && eza dd # → cd ~/try/tmp/day && eza de # → cd ~/new && eza .. # → cd .. && eza md new-dir # → mkdir -p new-dir && cd new-dir # Editor launchers # W / q → open in Cursor (creates missing files automatically) W src/main.ts # open file in Cursor q . # open current directory in Cursor W nonexistent.ts # creates file, then opens it # we → open in Zed via zed-open we src/index.ts # z → ctx gather (AI context aggregation) z "fix auth bug" # → ctx gather . --optimized "fix auth bug" z # → ctx . (show context for cwd) ``` -------------------------------- ### Git Reset and Force Push (Fish Shell) Source: https://context7.com/nikivdev/config/llms.txt Undoes the last commit while preserving changes, followed by a force push with lease. Use with caution to avoid data loss. ```fish # Undo last commit but keep changes, then force-push unpush # Runs: git reset HEAD^; git push --force-with-lease origin ``` -------------------------------- ### Git Repository Operations Source: https://context7.com/nikivdev/config/llms.txt Utility functions for common Git operations like cloning, setting SSH remotes, syncing forks, opening repositories in the browser, and managing pull requests. ```shell gcb https://github.com/org/repo # Runs: git clone --depth=1 git@github.com:org/repo.git ``` ```shell gitSetSshOrigin https://github.com/nikivdev/myrepo # Output: Remote origin set to: git@github.com:nikivdev/myrepo.git ``` ```shell gsync # fetches upstream, merges all branches, returns to original branch gsyncMain # fetches upstream, merges only main branch ``` ```shell gitRemoteOpen ``` ```shell gitPrOpen # Runs: gh pr view --web ``` ```shell triggerBuildWithNoCommit # Output: ✓ Build triggered ``` -------------------------------- ### Zed Editor Custom Key Bindings Source: https://context7.com/nikivdev/config/llms.txt Define custom key bindings for the Zed editor to enhance workflow. This JSON file allows remapping commands for workspace and editor contexts, including navigation and toggling UI elements. ```json // zed/keymap.json — custom key bindings [ { "context": "Workspace", "bindings": { "cmd-q": "workspace::ToggleLeftDock", "ctrl-r": "workspace::ToggleLeftDock", "ctrl-'": "workspace::ToggleBottomDock", "cmd-l": "file_finder::Toggle", "ctrl-j": "pane::ActivatePreviousItem", "ctrl-k": "pane::ActivateNextItem", "cmd-1": ["pane::ActivateItem", 0], "cmd-2": ["pane::ActivateItem", 1] } }, { "context": "Editor", "bindings": { "ctrl-f": "editor::GoToDefinition", "ctrl-e": "pane::GoBack", "cmd-;": ["editor::ToggleComments", { "advance_downwards": false }] } } ] ``` -------------------------------- ### Define Flow Tasks in TOML Source: https://context7.com/nikivdev/config/llms.txt Flow tasks are declarative TOML entries for named shell commands with optional dependencies. Run them with `f `. ```toml # flow.toml — define and run tasks via: f [[tasks]] name = "build-sync" command = "bun build sync/src/main.ts --compile --outfile ~/.local/bin/sync" description = "Build sync CLI binary" [[tasks]] name = "setup" command = "./sh/check-config-setup.sh" description = "Verify repo location and required symlinks" dependencies = ["ensure-sh", "ensure-ssh-config"] [[tasks]] name = "ensure-ssh-config" command = "f -p i setup" description = "Ensure ~/.ssh/config points to repo-managed config" [[tasks]] name = "ensure-sh" command = "bash -c 'set -eu; if [ -d sh/.git ]; then git -C sh remote get-url origin >/dev/null 2>&1 || { echo \"[x] sh repo exists but origin is missing\" >&2; exit 1; }; echo \"[ok] sh repo present\"; elif [ -e sh ]; then echo \"[x] sh directory exists but is not a git repo\" >&2; exit 1; else echo \"[info] cloning https://github.com/nikivdev/sh.git into ./sh\"; git clone https://github.com/nikivdev/sh.git sh; fi'" description = "Ensure nikivdev/sh repo is present" # Run a task: # f setup → runs setup + its dependencies (ensure-sh, ensure-ssh-config) # f build-sync → compiles sync binary to ~/.local/bin/sync ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.