### Initialize Project with Default Daemon and Sync Source: https://bitloops.com/docs/guides/semantic-embeddings-quickstart Initialize a new Bitloops project, installing the default daemon and performing a synchronous setup. ```bash bitloops init --install-default-daemon --sync=true ``` -------------------------------- ### Start the Bitloops Daemon Source: https://bitloops.com/docs/reference/cli-commands Starts the Bitloops daemon. Options include creating default configurations, specifying a config file, and bootstrapping local stores. Use `--create-default-config` for non-interactive setup on a fresh machine. ```bash bitloops start ``` ```bash bitloops start --create-default-config ``` ```bash bitloops start --config ./config.toml --bootstrap-local-stores ``` ```bash bitloops daemon start ``` ```bash bitloops daemon start -d ``` ```bash bitloops daemon start --until-stopped ``` -------------------------------- ### Start Daemon with Local Dashboard Network Recheck Source: https://bitloops.com/docs/guides/dashboard-local-https-setup Start the Bitloops daemon and recheck the local dashboard network setup to ensure HTTPS is preferred. ```bash bitloops daemon start --recheck-local-dashboard-net ``` -------------------------------- ### DevQL DSL Examples Source: https://bitloops.com/docs/guides/select-artefacts Examples of using the DevQL DSL to select artefacts and query specific stages. ```APIDOC ## DevQL DSL Form​ The DevQL DSL supports `selectArtefacts(...)` with flat selector args: ```graphql selectArtefacts(symbol_fqn:"rust-app/src/main.rs::main")->checkpoints() selectArtefacts(fuzzy_name:"payLater()")->checkpoints() selectArtefacts(path:"rust-app/src/main.rs",lines:6..10)->deps() selectArtefacts(path:"rust-app/src/main.rs")->tests(min_confidence:0.8) ``` Current DSL limitations: * compiles only against the slim endpoint * supports one explicit terminal stage at a time * defaults to selecting `summary` * `->select(summary,schema)` is supported for the chosen stage * aggregate `selectArtefacts { summary }` is not yet available through the DSL ``` -------------------------------- ### Install Bitloops via Homebrew Source: https://bitloops.com/docs/getting-started/quickstart Install Bitloops using the Homebrew package manager. Ensure you have Homebrew installed and configured. ```bash brew tap bitloops/tap && brew install bitloops ``` -------------------------------- ### Start AI Session with Task Source: https://bitloops.com/docs/guides/end-to-end-workflow Initiate an AI session by providing a task description to your agent. ```bash > Add rate limiting middleware to the API. Use express-rate-limit with a > 100 requests per 15 minute window. Apply it globally but skip health > check endpoints. ``` -------------------------------- ### Initialize Bitloops with Default Daemon Source: https://bitloops.com/docs Use this command to quickly set up Bitloops and install the default daemon for immediate use. ```bash bitloops init --install-default-daemon ``` -------------------------------- ### Start Bitloops Daemon with Default Config Creation Source: https://bitloops.com/docs/guides/semantic-embeddings-quickstart Start the Bitloops daemon and create a default configuration file if one does not exist. ```bash bitloops start --create-default-config ``` -------------------------------- ### DevQL DSL Pipeline Example Source: https://bitloops.com/docs/concepts/devql Example of using the DevQL DSL pipeline in the CLI for querying artefacts and limiting results. ```bash repo("bitloops")->artefacts()->limit(10) ``` -------------------------------- ### Start Bitloops Daemon with Local Stores Source: https://bitloops.com/docs/getting-started/quickstart Start the Bitloops daemon and bootstrap local file-backed stores for a specific configuration. Use this for repo-scoped or test-specific daemon configurations. ```bash bitloops start --config ./config.toml --bootstrap-local-stores ``` -------------------------------- ### Install Hosted Embeddings Runtime Source: https://bitloops.com/docs/guides/semantic-embeddings-quickstart Install the hosted embeddings runtime, specifying a custom gateway URL. ```bash bitloops embeddings install --runtime platform --gateway-url https://gateway.example/v1/embeddings ``` -------------------------------- ### Initialize Bitloops Project with Default Daemon Source: https://bitloops.com/docs/reference/cli-commands Bootstrap the current project or subproject, optionally installing the default daemon and configuring embeddings. ```bash bitloops init --install-default-daemon ``` ```bash bitloops init --install-default-daemon --sync=true ``` ```bash bitloops init --install-default-daemon --embeddings-runtime platform --embeddings-gateway-url https://gateway.example/v1/embeddings ``` ```bash bitloops init --install-default-daemon --no-embeddings ``` -------------------------------- ### Initialize Bitloops Project Source: https://bitloops.com/docs/concepts/capture Run this command to install git hooks, agent hooks, and resolve telemetry consent for your project. ```bash bitloops init ``` -------------------------------- ### Start Bitloops Daemon with Default Configuration Source: https://bitloops.com/docs/getting-started/quickstart Start the Bitloops daemon and create the default global configuration. This is useful for bootstrapping the daemon before initializing a repository or for inspecting the configuration. ```bash bitloops start --create-default-config ``` -------------------------------- ### Raw GraphQL Query Example Source: https://bitloops.com/docs/concepts/devql Example of using a raw GraphQL document in the CLI to query repository information. ```graphql { repo(name: "bitloops") { ... } } ``` -------------------------------- ### Initialize Default Daemon and Sync Source: https://bitloops.com/docs/guides/team-setup Use this command for the fastest onboarding path. It bootstraps the default daemon, creates a local config, installs hooks, and syncs the current state. ```bash bitloops init --install-default-daemon --sync=true ``` -------------------------------- ### Install and Verify Embeddings Runtime Source: https://bitloops.com/docs/guides/semantic-embeddings-quickstart Install the `bitloops-local-embeddings` runtime if it's not found. Verify the installation using the doctor command. ```bash bitloops embeddings install ``` ```bash bitloops embeddings doctor ``` -------------------------------- ### Example Local Project File Source: https://bitloops.com/docs/reference/configuration A TOML configuration file for local project settings, typically created by `bitloops init`. ```toml [capture] enabled = true strategy = "manual-commit" [agents] supported = ["claude-code"] ``` -------------------------------- ### Get Help for Bitloops Commands Source: https://bitloops.com/docs/reference/cli-commands Access help documentation for the Bitloops CLI or specific commands like `devql`. ```bash bitloops help ``` ```bash bitloops help devql ``` -------------------------------- ### Get Clones with User-Facing Projection Source: https://bitloops.com/docs/guides/devql-query-cookbook This example demonstrates how to query for code clones using the DevQL DSL. It defaults to a user-facing projection showing source and target artefacts, relation kind, and score. Use `clones(raw:true)` for low-level details. ```APIDOC ## DevQL DSL ### Query for Clones ``` bitloops devql query 'repo("bitloops")->artefacts(kind:"function")->clones(min_score:0.8)->limit(10)' ``` ### Raw GraphQL Equivalent ```graphql { repo(name: "bitloops") { project(path: "bitloops/src") { clones(first: 10, filter: { minScore: 0.8 }) { edges { node { relationKind score sourceArtefact { path symbolFqn } targetArtefact { path symbolFqn } } } } } } } ``` ``` -------------------------------- ### Clone and Build Bitloops Source: https://bitloops.com/docs/contributors/development-setup Clone the repository, set up configuration files, and perform initial builds. This is a one-time setup for local development. ```bash # Fork the repo on GitHub, then: git clone https://github.com/YOUR_USERNAME/bitloops.git cd bitloops # One-time setup for build-time dashboard URLs cp bitloops/config/dashboard_urls.template.json bitloops/config/dashboard_urls.json # Fast local checks/builds cargo dev-check cargo dev-build # Run cargo run --manifest-path bitloops/Cargo.toml --no-default-features -- --version ``` -------------------------------- ### Build and Install Bitloops Source: https://bitloops.com/docs/guides/semantic-embeddings-quickstart Build the Bitloops project and install it locally. Prefer `cargo dev-install` on macOS for correct DuckDB runtime staging. ```bash cargo build cargo dev-install ``` -------------------------------- ### Start Daemon with Default Configuration Source: https://bitloops.com/docs/guides/team-setup Use this command when you need to inspect or customize the daemon configuration before bootstrapping the repository. It creates the default global daemon config and necessary store paths. ```bash bitloops start --create-default-config ``` -------------------------------- ### Initialize Bitloops Project with Immediate Sync Source: https://bitloops.com/docs/getting-started/quickstart Initialize a Bitloops project and immediately perform a current-state sync. Use this when you want the initial synchronization to happen right after setup. ```bash bitloops init --install-default-daemon --sync=true ``` -------------------------------- ### Ignore File Example Source: https://bitloops.com/docs/reference/configuration An example ignore file containing glob patterns, one per line, used for scope exclusions. ```ignore # One glob per line **/*.generated.ts **/third_party/** docs/** ``` -------------------------------- ### Install Bitloops via Curl Source: https://bitloops.com/docs/getting-started/quickstart Use this command to install Bitloops using a curl script. This is a common method for Unix-like systems. ```bash curl -fsSL https://bitloops.com/install.sh | bash ``` -------------------------------- ### Install Cargo Nextest (macOS) Source: https://bitloops.com/docs/contributors/development-setup Install `cargo-nextest` using Homebrew on macOS. This tool is used for executing the test lanes. ```bash brew install cargo-nextest ``` -------------------------------- ### Initialize Bitloops Project Source: https://bitloops.com/docs/reference/configuration Initializes the current directory as a Bitloops project, creating/updating configuration files and installing hooks. Use flags for explicit control over sync and ingest. ```bash bitloops init ``` ```bash bitloops init --sync=true --ingest=true ``` ```bash bitloops init --install-default-daemon ``` ```bash bitloops init --embeddings-runtime local --sync=true ``` ```bash bitloops init --no-embeddings ``` ```bash bitloops init --exclude "dist/**" --exclude-from ".gitignore" ``` -------------------------------- ### Start Daemon with Local HTTP Source: https://bitloops.com/docs/guides/dashboard-local-https-setup Force a local HTTP run instead of HTTPS by using the --http flag and specifying the host. ```bash bitloops daemon start --http --host 127.0.0.1 ``` -------------------------------- ### DevQL DSL with Capability Pack Stage Source: https://bitloops.com/docs/concepts/devql Example of using the DevQL DSL to select artefacts and then query for specific capability pack stages like checkpoints. ```bash selectArtefacts(checkpoints()) ``` -------------------------------- ### Example Commit Message Source: https://bitloops.com/docs/contributors/submitting-changes Follow a clear and descriptive format for commit messages. This example shows a 'feat' type commit with a concise subject and a detailed body explaining the implementation. ```git feat: add support for OpenCode agent hooks Implements the adapter for OpenCode following the existing agent adapter pattern in src/adapters/agents/. ``` -------------------------------- ### Install Bitloops via Cargo Source: https://bitloops.com/docs/getting-started/quickstart Install Bitloops using Cargo, the Rust package manager. This method is suitable if you have Rust and Cargo set up. ```bash cargo install bitloops ``` -------------------------------- ### Install Embeddings Runtime Source: https://bitloops.com/docs/reference/cli-commands Commands to install the managed standalone runtime or the hosted gateway runtime for embeddings. Use `--gateway-url` to override the default endpoint and `--api-key-env` if the bearer token is stored in a different environment variable. ```bash bitloops embeddings install ``` ```bash bitloops embeddings install --runtime platform --gateway-url https://gateway.example/v1/embeddings ``` -------------------------------- ### Initialize Project with Specific Agents and No Sync Source: https://bitloops.com/docs/guides/team-setup This command initializes the project, pins specific agents like 'claude-code' and 'codex', and skips the initial sync. It's useful for non-interactive setups. ```bash bitloops init --sync=false --agent claude-code --agent codex ``` -------------------------------- ### Start the Bitloops Daemon Manually Source: https://bitloops.com/docs/guides/using-the-dashboard Starts the Bitloops daemon. Use the `-d` flag for detached mode or `--until-stopped` for foreground mode. ```bash bitloops start ``` ```bash bitloops start -d ``` ```bash bitloops start --until-stopped ``` -------------------------------- ### Example Shared Project Policy Source: https://bitloops.com/docs/reference/configuration A TOML configuration file defining shared project policies for capture, watch, scope, agents, and imports. ```toml [capture] enabled = true strategy = "manual-commit" [capture.summarize] enabled = true [watch] watch_debounce_ms = 750 watch_poll_fallback_ms = 2500 [scope] project_root = "packages/app" include = ["src/**", "tests/**"] exclude = ["dist/**", "coverage/**"] exclude_from = [".gitignore", "config/devql.ignore"] [agents] default = "claude-code" allowed = ["claude-code", "cursor", "codex"] normalise_branches = true [imports] knowledge = ["bitloops/knowledge.toml"] ``` -------------------------------- ### Bootstrap Local Stores with Bitloops Source: https://bitloops.com/docs/guides/configuring-storage When using an explicit daemon configuration, create the necessary local store artifacts using this command. This is useful for repository-scoped or test setups. ```bash bitloops start --config /path/to/config.toml --bootstrap-local-stores ``` -------------------------------- ### Explain AI Activity with Bitloops Source: https://bitloops.com/docs/guides/end-to-end-workflow Use 'bitloops explain' to get a detailed summary of the AI session, including the prompt, reasoning, and files modified. ```bash bitloops explain ``` -------------------------------- ### Initialize Bitloops Project with Default Daemon Source: https://bitloops.com/docs/getting-started/quickstart Quickly initialize a new Bitloops project. This command installs the default daemon service, updates configuration files, and sets up git hooks. ```bash bitloops init --install-default-daemon ``` -------------------------------- ### Configure Capture Behavior Source: https://bitloops.com/docs/concepts/checkpoints-and-sessions Define capture settings within the repository policy. This example enables capture and sets the strategy to manual-commit. ```ini [capture] enabled = true strategy = "manual-commit" ``` -------------------------------- ### Example Local Override Source: https://bitloops.com/docs/reference/configuration A local TOML configuration file that overrides specific settings from a shared project file. ```toml [capture] enabled = false [watch] watch_debounce_ms = 1500 ``` -------------------------------- ### Example Bitloops Daemon Configuration (config.toml) Source: https://bitloops.com/docs/reference/configuration This TOML file demonstrates the structure and common settings for the Bitloops daemon configuration. It covers runtime defaults, telemetry, logging levels, store paths for relational, event, and blob data, provider credentials, semantic clone settings, inference runtime configurations, and dashboard defaults. ```toml [runtime] local_dev = false cli_version = "1.2.3" [telemetry] enabled = true [logging] level = "info" [stores.relational] sqlite_path = "/Users/alex/.local/share/bitloops/stores/relational/relational.db" [stores.events] duckdb_path = "/Users/alex/.local/share/bitloops/stores/event/events.duckdb" [stores.blob] local_path = "/Users/alex/.local/share/bitloops/stores/blob" [knowledge.providers.github] token = "${GITHUB_TOKEN}" [knowledge.providers.atlassian] site_url = "https://example.atlassian.net" email = "${ATLASSIAN_EMAIL}" token = "${ATLASSIAN_TOKEN}" [semantic_clones] summary_mode = "auto" embedding_mode = "semantic_aware_once" ann_neighbors = 5 enrichment_workers = 1 [semantic_clones.inference] summary_generation = "summary_llm" code_embeddings = "local_code" summary_embeddings = "local_code" [inference.runtimes.bitloops_inference] command = "/Users/alex/Library/Application Support/bitloops/tools/bitloops-inference/bitloops-inference" args = [] startup_timeout_secs = 60 request_timeout_secs = 300 [inference.runtimes.bitloops_local_embeddings] command = "/Users/alex/Library/Application Support/bitloops/tools/bitloops-local-embeddings/bitloops-local-embeddings" args = [] startup_timeout_secs = 60 request_timeout_secs = 300 [inference.profiles.local_code] task = "embeddings" driver = "bitloops_embeddings_ipc" runtime = "bitloops_local_embeddings" model = "bge-m3" [inference.profiles.summary_llm] task = "text_generation" runtime = "bitloops_inference" driver = "openai_chat_completions" model = "gpt-5.4-mini" api_key = "${OPENAI_API_KEY}" base_url = "https://api.openai.com/v1/chat/completions" temperature = "0.1" max_output_tokens = 200 [dashboard] bundle_dir = "/Users/alex/Library/Caches/bitloops/dashboard/bundle" [dashboard.local_dashboard] tls = true ``` -------------------------------- ### Cross-Pack Access Configuration Example Source: https://bitloops.com/docs/contributors/architecture/devql-core-pack-boundaries This JSON configuration defines cross-pack access rules, specifying which capabilities can read specific resources from other capabilities. It is merged into the host's configuration root. ```json { "host": { "invocation": { "stage_timeout_secs": 120, "ingester_timeout_secs": 300, "subquery_timeout_secs": 60 }, "cross_pack_access": [ { "from_capability": "test_harness", "to_capability": "knowledge", "resource": "devql_registered_stage", "mode": "read" } ] } } ``` -------------------------------- ### Querying Stage Details with Items Source: https://bitloops.com/docs/guides/select-artefacts Example of querying for dependency stage details, including summary, schema, and specific items with pagination. This demonstrates the normal escalation path from summary to detailed items. ```graphql { selectArtefacts(by: { path: "rust-app/src/main.rs" }) { deps { summary schema items(first: 10) { id edgeKind toSymbolRef } } } } ``` -------------------------------- ### Query Repository Artefacts with DevQL Source: https://bitloops.com/docs/getting-started/quickstart Query repository artefacts using the DevQL language. This example retrieves the first 10 function artefacts from the 'bitloops' repository. ```bash bitloops devql query 'repo("bitloops")->artefacts(kind:"function")->limit(10)' ``` -------------------------------- ### Login to Bitloops Source: https://bitloops.com/docs/reference/cli-commands Starts the WorkOS device-login flow for the CLI. This command opens the verification URL in your browser when possible and always prints the URL and user code as a fallback. ```APIDOC ## `bitloops login` ### Description Starts the WorkOS device-login flow for the CLI. ### Usage ``` bitloops login bitloops login status ``` ### Notes - Opens the verification URL in your browser when possible, and always prints the URL and user code as a fallback. - Works out of the box with the built-in WorkOS client id. - `BITLOOPS_WORKOS_CLIENT_ID` and `BITLOOPS_WORKOS_BASE_URL` are advanced overrides for non-default WorkOS environments. - Token material is stored in the platform secure credential store. - Session metadata is stored in the daemon runtime store. - `bitloops login status` refreshes the access token automatically when the stored refresh token is still valid. ``` -------------------------------- ### Login to Bitloops CLI Source: https://bitloops.com/docs/reference/cli-commands Starts the WorkOS device-login flow for the CLI. It opens the verification URL in the browser or prints it as a fallback. `bitloops login status` refreshes the access token. ```bash bitloops login ``` ```bash bitloops login status ``` -------------------------------- ### Re-enable Embeddings Installation Source: https://bitloops.com/docs/guides/semantic-embeddings-quickstart Rerun one of these commands to install embeddings after fixing the local runtime, if setup failed previously. ```bash bitloops enable --install-embeddings ``` ```bash bitloops daemon enable --install-embeddings ``` ```bash bitloops embeddings pull local_code ``` -------------------------------- ### Get Clone Summary Across Filtered Artefacts Source: https://bitloops.com/docs/guides/devql-query-cookbook This example shows how to get an aggregate summary of clones for a specific set of artefacts using the `cloneSummary` field in Raw GraphQL. ```APIDOC ## Raw GraphQL Summary Across Filtered Artefact Set ### Query for Clone Summary ```graphql { repo(name: "bitloops") { cloneSummary( filter: { kind: FUNCTION, symbolFqn: "packages/api/src/caller.ts::caller" } cloneFilter: { minScore: 0.75 } ) { totalCount groups { relationKind count } } } } ``` ``` -------------------------------- ### Get Clone Summary Attached to a Specific Artefact Source: https://bitloops.com/docs/guides/devql-query-cookbook This example demonstrates how to retrieve a clone summary that is attached to a specific artefact node, using nested `clones { summary }` within a file query in Raw GraphQL. ```APIDOC ## Raw GraphQL Summary for One Resolved Artefact ### Query for Artefact-Specific Clone Summary ```graphql { repo(name: "bitloops") { file(path: "packages/api/src/caller.ts") { artefacts( filter: { kind: FUNCTION, symbolFqn: "packages/api/src/caller.ts::caller" } first: 1 ) { edges { node { path symbolFqn clones(first: 10, filter: { minScore: 0.75 }) { totalCount summary { totalCount groups { relationKind count } } } } } } } } } ``` ``` -------------------------------- ### Initialize DevQL Schema Source: https://bitloops.com/docs/reference/cli-commands Ensures the configured relational and event schemas exist. Daemon startup typically handles the normal schema bootstrap path. ```bash bitloops devql init ``` -------------------------------- ### Install Cargo LLVM Coverage Source: https://bitloops.com/docs/contributors/development-setup Install the `cargo-llvm-cov` tool, which is used for generating test coverage reports. ```bash cargo install cargo-llvm-cov ``` -------------------------------- ### Initialize DevQL Schema Source: https://bitloops.com/docs/guides/configuring-devql Ensures the configured relational and event schemas exist. The daemon bootstraps the DevQL schema automatically on startup. ```bash bitloops devql init ``` -------------------------------- ### Initialize Bitloops Project Source: https://bitloops.com/docs/reference/cli-commands Initialize the Bitloops project in the current directory. This command creates or updates the `.bitloops.local.toml` configuration file. ```bash bitloops init ``` ```bash bitloops init --sync=true ``` ```bash bitloops init --sync=false ``` -------------------------------- ### Get Aggregate Clone Summary Source: https://bitloops.com/docs/guides/devql-graphql Use `cloneSummary` to get an aggregate summary over a filtered set of artefacts. Specify filters for the artefact kind and symbol fully qualified name. ```graphql { repo(name: "bitloops") { cloneSummary( filter: { kind: FUNCTION, symbolFqn: "bitloops/src/main.rs::main" } cloneFilter: { minScore: 0.75 } ) { totalCount groups { relationKind count } } } } ``` -------------------------------- ### Bootstrap Project Locally (Daemon Already Running) Source: https://bitloops.com/docs/guides/team-setup Use this command when the daemon is already running or has been bootstrapped separately. It creates a local config file and adds it to git exclude rules. ```bash bitloops init --sync=true ``` -------------------------------- ### Stop the Bitloops Daemon Source: https://bitloops.com/docs/reference/cli-commands Stops the Bitloops daemon. This command can stop the always-on service if it is installed. ```bash bitloops stop ``` ```bash bitloops daemon stop ``` -------------------------------- ### Git Commit Output Source: https://bitloops.com/docs/guides/end-to-end-workflow Example output from a Git commit, showing files changed and their status. ```text [main f4e5d6c] feat: add rate limiting middleware 3 files changed, 45 insertions(+), 2 deletions(-) create mode 100644 src/middleware/rate-limit.ts ``` -------------------------------- ### Check Standalone Binary Path Source: https://bitloops.com/docs/guides/semantic-embeddings-quickstart Verify that the standalone `bitloops-local-embeddings` binary is installed and accessible in your system's PATH. ```bash which bitloops-local-embeddings ``` -------------------------------- ### Bitloops Status Output Source: https://bitloops.com/docs/guides/end-to-end-workflow Example output showing Bitloops capture status, active agents, and checkpoint count. ```text Capture: enabled Agents: claude-code, cursor Session: idle Checkpoints: 8 total (committed) ``` -------------------------------- ### Initialize Bitloops Project with Specific Agents Source: https://bitloops.com/docs/getting-started/quickstart Initialize a Bitloops project and pin the supported agent set. Specify agents using the --agent flag for each desired agent. ```bash bitloops init --sync=false --agent claude-code --agent codex ``` -------------------------------- ### Configure Provider Credentials (TOML) Source: https://bitloops.com/docs/guides/connecting-knowledge-sources Add provider credentials to the global daemon configuration file (config.toml). Ensure environment variables for tokens and emails are set. ```toml [knowledge.providers.github] token = "${GITHUB_TOKEN}" [knowledge.providers.atlassian] site_url = "https://example.atlassian.net" email = "${ATLASSIAN_EMAIL}" token = "${ATLASSIAN_TOKEN}" ``` -------------------------------- ### Create Default Daemon Config Source: https://bitloops.com/docs/troubleshooting/faq Use these commands to create the default daemon configuration, either interactively or non-interactively with telemetry flags. The third option bootstraps local stores. ```bash bitloops start --create-default-config ``` ```bash bitloops start --create-default-config --telemetry ``` ```bash bitloops start --config /path/to/config.toml --bootstrap-local-stores ``` -------------------------------- ### Select Artefacts GraphQL Query Source: https://bitloops.com/docs/concepts/devql Example of a GraphQL query using `selectArtefacts` to find artefacts by path and lines, and retrieve a summary. ```graphql { selectArtefacts(by: { path: "rust-app/src/main.rs", lines: { start: 6, end: 10 } }) { summary } } ``` -------------------------------- ### Launch Local Dashboard Directly Source: https://bitloops.com/docs/guides/dashboard-local-https-setup Open the Bitloops dashboard directly using the command-line launcher. ```bash bitloops dashboard ``` -------------------------------- ### Override Default Bundle Location Source: https://bitloops.com/docs/guides/using-the-dashboard Temporarily override the default dashboard bundle directory using the `--bundle-dir` flag when starting the daemon. ```bash bitloops daemon start --bundle-dir /path/to/bundle ``` -------------------------------- ### Remote Storage Configuration Source: https://bitloops.com/docs/guides/configuring-storage Sets up remote storage using PostgreSQL for relational data, ClickHouse for events, and S3 for blobs. ```toml [stores.relational] postgres_dsn = "${BITLOOPS_POSTGRES_DSN}" [stores.events] clickhouse_url = "http://localhost:8123" clickhouse_user = "${BITLOOPS_CLICKHOUSE_USER}" clickhouse_password = "${BITLOOPS_CLICKHOUSE_PASSWORD}" clickhouse_database = "bitloops" [stores.blob] s3_bucket = "bitloops-artifacts" s3_region = "eu-west-1" s3_access_key_id = "${AWS_ACCESS_KEY_ID}" s3_secret_access_key = "${AWS_SECRET_ACCESS_KEY}" ``` -------------------------------- ### Manage Bitloops Daemon Source: https://bitloops.com/docs/getting-started/quickstart Start the Bitloops daemon in detached mode or keep it running until explicitly stopped. Use these commands for manual daemon management. ```bash bitloops start -d ``` ```bash bitloops start --until-stopped ``` -------------------------------- ### CLI Query Modes: DSL vs. Raw GraphQL Source: https://bitloops.com/docs/guides/devql-graphql Execute DevQL queries using either the DevQL DSL pipeline syntax (containing '->') or raw GraphQL. The `--graphql` flag can force raw GraphQL execution. Use `--compact` to emit compact JSON output. ```bash # DSL pipeline compiled to GraphQL before execution bitloops devql query 'repo("bitloops")->artefacts(kind:"function")->limit(5)' # Raw GraphQL is the default when there is no `->` bitloops devql query '{ repo(name: "bitloops") { artefacts(first: 5) { edges { node { path symbolFqn canonicalKind } } } } }' # Emit compact JSON instead of pretty JSON or table output bitloops devql query --compact '{ health { relational { backend connected } } }' ``` -------------------------------- ### Create Default Daemon Configuration Source: https://bitloops.com/docs/troubleshooting/common-issues Use this command to create the default daemon configuration file if it does not exist. This is useful in non-interactive environments where the config is not automatically generated. ```bash bitloops start --create-default-config ``` -------------------------------- ### Scope to a Project in a Monorepo Source: https://bitloops.com/docs/guides/devql-query-cookbook Query artifacts within a specific project path in a monorepo. This example shows how to filter by project path and select artifact details. ```graphql { repo(name: "bitloops") { project(path: "bitloops/src/graphql") { artefacts(first: 10) { edges { node { path symbolFqn } } } } } } ``` ```bash bitloops devql query --compact '{ repo(name: "bitloops") { project(path: "bitloops/src/graphql") { artefacts(first: 10) { edges { node { path symbolFqn } } } } } }' ``` -------------------------------- ### Define Knowledge Source Repositories and Labels Source: https://bitloops.com/docs/reference/configuration Use TOML files to define knowledge sources, specifying repositories and labels for GitHub or spaces and projects for Atlassian. ```toml [sources.github] repositories = ["bitloops/bitloops"] labels = ["documentation", "devql"] [sources.atlassian] spaces = ["ENG", "DOCS"] projects = ["BIT"] ``` -------------------------------- ### GraphQL Query: Slim Selection Summary Source: https://bitloops.com/docs/guides/devql-graphql Use `selectArtefacts` with a `by` clause to get a compact summary of available analysis stages for a given path and line range. ```graphql { selectArtefacts( by: { path: "rust-app/src/main.rs", lines: { start: 6, end: 10 } } ) { summary } } ``` -------------------------------- ### Disable Capture with Bitloops Source: https://bitloops.com/docs/reference/cli-commands Disables capture in the nearest discovered project policy by toggling `[capture].enabled = false`. Hooks and watchers remain installed but become no-ops. ```bash bitloops disable ``` -------------------------------- ### DevQL CLI Query Modes Source: https://bitloops.com/docs/concepts/devql Demonstrates how the `bitloops devql query` command handles DSL vs. raw GraphQL input and the explicit override. ```bash bitloops devql query --graphql '{ repo(name: "bitloops") { ... } }' ``` -------------------------------- ### Configure Machine-Specific Stores and Credentials Source: https://bitloops.com/docs/guides/team-setup This TOML configuration sets up relational and event stores using SQLite and DuckDB, respectively. It also configures the GitHub knowledge provider with a token. ```toml [stores.relational] sqlite_path = "/Users/alex/.local/share/bitloops/stores/relational/relational.db" [stores.events] duckdb_path = "/Users/alex/.local/share/bitloops/stores/event/events.duckdb" [knowledge.providers.github] token = "${GITHUB_TOKEN}" ```