Bear
Generate compile_commands.json for any C or C++ build
File Explorer
Download Latest Version (.zip)- rust.md
- testing.md
- SKILL.md
- SKILL.md
- devcontainer.json
- Dockerfile
- bug_report.yml
- config.yml
- build_rust.yml
- pages.yml
- FUNDING.yml
- labels.yml
- codegen.rs
- env_keys.rs
- families.rs
- lib.rs
- recognition.rs
- resolve.rs
- tables.rs
- wrappers.rs
- yaml_types.rs
- snapshots__snapshot_compiler_ids.snap
- snapshots__snapshot_env_keys.snap
- snapshots__snapshot_families.snap
- snapshots__snapshot_flags_armclang.snap
- snapshots__snapshot_flags_clang.snap
- snapshots__snapshot_flags_clang_cl.snap
- snapshots__snapshot_flags_cray_cc.snap
- snapshots__snapshot_flags_cray_fortran.snap
- snapshots__snapshot_flags_cuda.snap
- snapshots__snapshot_flags_fasm.snap
- snapshots__snapshot_flags_flang.snap
- snapshots__snapshot_flags_gcc.snap
- snapshots__snapshot_flags_ibm_xl.snap
- snapshots__snapshot_flags_intel_cc.snap
- snapshots__snapshot_flags_intel_fortran.snap
- snapshots__snapshot_flags_mpi.snap
- snapshots__snapshot_flags_msvc.snap
- snapshots__snapshot_flags_nasm.snap
- snapshots__snapshot_flags_nvidia_hpc.snap
- snapshots__snapshot_flags_qnx.snap
- snapshots__snapshot_flags_swift.snap
- snapshots__snapshot_flags_ti_cgt.snap
- snapshots__snapshot_flags_vala.snap
- snapshots__snapshot_recognition.snap
- proptest_patterns.rs
- snapshots.rs
- yaml_validation.rs
- Cargo.toml
- CLAUDE.md
- lib.rs
- build.rs
- Cargo.toml
- CLAUDE.md
- loader.rs
- mod.rs
- types.rs
- validation.rs
- execution.rs
- mod.rs
- converter.rs
- json.rs
- mod.rs
- path_format.rs
- serialization.rs
- mod.rs
- source.rs
- unique.rs
- append.rs
- atomic.rs
- converter.rs
- file.rs
- mod.rs
- stdout.rs
- synthesis.rs
- validating.rs
- formats.rs
- intercept.rs
- mod.rs
- statistics.rs
- mod.rs
- parser.rs
- tokenizer.rs
- args.rs
- environment.rs
- lib.rs
- Cargo.toml
- CLAUDE.md
- main.rs
- Cargo.toml
- CLAUDE.md
- main.rs
- Cargo.toml
- main.rs
- Cargo.toml
- environment.rs
- lib.rs
- logging.rs
- reporter.rs
- state.rs
- tcp.rs
- build.rs
- Cargo.toml
- shim.c
- implementation.rs
- lib.rs
- session.rs
- build.rs
- Cargo.toml
- CLAUDE.md
- README.md
- collector.rs
- context.rs
- installation.rs
- lib.rs
- runner.rs
- supervise.rs
- wrapper.rs
- build.rs
- Cargo.toml
- CLAUDE.md
- armclang.yaml
- ccache.yaml
- clang.yaml
- clang_cl.yaml
- CLAUDE.md
- cray_cc.yaml
- cray_fortran.yaml
- cuda.yaml
- distcc.yaml
- fasm.yaml
- flang.yaml
- gcc.yaml
- ibm_xl.yaml
- icecc.yaml
- intel_cc.yaml
- intel_fortran.yaml
- mpi.yaml
- msvc.yaml
- nasm.yaml
- nvidia_hpc.yaml
- qnx.yaml
- README.md
- sccache.yaml
- swift.yaml
- ti_cgt.yaml
- vala.yaml
- compiler_recognition.rs
- flag_based.rs
- identity.rs
- mod.rs
- print.rs
- probe.rs
- response_file.rs
- wrapper.rs
- mod.rs
- source.rs
- combinators.rs
- ignore.rs
- mod.rs
- lib.rs
- testing.rs
- build.rs
- Cargo.toml
- CLAUDE.md
- ambiguous-cc-version-probe.md
- CLAUDE.md
- compiler-as-no-aliases.md
- compiler-env-flag-parsing.md
- compiler-family-definition.md
- docs-site-over-wiki.md
- duplicate-latest-flags-win.md
- event-file-defaults.md
- generated-file-filter-globs.md
- header-synthesis-sibling-clone.md
- mpi-wrappers-as-compilers.md
- parse-sh-database-product.md
- parse-sh-producer.md
- parse-sh-single-tokenizer.md
- preload-linker-selection.md
- process-tree-teardown.md
- source-filter-last-match-wins.md
- structured-data-scope.md
- swift-whole-module-entries.md
- vala-transpiler-database.md
- workspace-crate-layout.md
- wrapper-mode-design-decisions.md
- wrapper-recursion-ccache-alternatives.md
- CLAUDE.md
- cli-diagnostic-format.md
- cli-exit-codes.md
- cli-signal-forwarding.md
- interception-cc-env-var-flags.md
- interception-events-format.md
- interception-mode-selection.md
- interception-preload-mechanism.md
- interception-shell-text-parsing.md
- interception-wrapper-mechanism.md
- interception-wrapper-recursion.md
- output-append.md
- output-atomic-write.md
- output-compilation-entries.md
- output-duplicate-detection.md
- output-env-derived-flags.md
- output-generated-file-filter.md
- output-header-entries.md
- output-json-compilation-database.md
- output-path-format.md
- output-response-file-inlining.md
- output-source-directory-filter.md
- recognition-ambiguous-name-probe.md
- recognition-compiler-launchers.md
- recognition-compiler-names.md
- recognition-cpp20-modules.md
- CLAUDE.md
- bear.1
- bear.1.md
- CLAUDE.md
- check-crate-table-coverage.sh
- check-docs-site.sh
- check-requirements-coverage.sh
- generate-command-line-reference.py
- generate-supported-compilers.py
- install.sh
- postprocess-docs-site.sh
- ccache-distcc-icecc.md
- clangd-setup.md
- cmake.md
- compile-commands-for-makefile.md
- cray-hpc.md
- cross-compilation.md
- cuda.md
- docker.md
- dry-run-capture.md
- embedded-arm.md
- empty-compilation-database.md
- emscripten.md
- headers.md
- index.md
- intel-oneapi.md
- mpi.md
- multilib.md
- vendor-embedded.md
- troubleshooting.md
- bsd.md
- linux.md
- macos.md
- windows.md
- command-line.md
- configuration.md
- exit-status.md
- supported-compilers.md
- autotools-tutorial.md
- compile-commands-from-a-build-log.md
- getting-started.md
- how-it-works.md
- 404.md
- index.md
- installation.md
- SUMMARY.md
- head.hbs
- book.toml
- CLAUDE.md
- Containerfile
- hello.c
- bad-directory.json
- blank-directory.json
- duplicate.json
- empty-arguments.json
- undercount.json
- compile_commands.json
- consumer-fault-demo.sh
- consumer-loop.sh
- lib.sh
- replay-loop.sh
- selftest.sh
- .gitignore
- README.md
- config.env
- Containerfile
- config.env
- Containerfile
- config.env
- Containerfile
- bear.yaml
- config.env
- Containerfile
- config.env
- Containerfile
- config.env
- Containerfile
- README.md
- run.sh
- SPEC.md
- compilation_output.rs
- config.rs
- environment_arguments.rs
- exit_codes.rs
- hardened_intercept.rs
- intercept.rs
- intercept_posix.rs
- mod.rs
- parse_sh.rs
- response_files.rs
- semantic.rs
- zlib.make-n-w.sh
- zlib.make-n.sh
- bear_output.rs
- compilation_database.rs
- install_environment.rs
- intercept_events.rs
- mod.rs
- test_environment.rs
- tests.rs
- constants.rs
- external_dependencies.rs
- mod.rs
- integration.rs
- build.rs
- Cargo.toml
- CLAUDE.md
- cdb-compare.rs
- cdb.rs
- compare.rs
- invariants.rs
- lib.rs
- matcher.rs
- sample.rs
- Cargo.toml
- CLAUDE.md
- SPEC.md
- .codespellrc
- .deny.toml
- .gitattributes
- .gitignore
- .rustfmt.toml
- Cargo.lock
- Cargo.toml
- CLAUDE.md
- CODE_OF_CONDUCT.md
- CONTRIBUTING.md
- COPYING
- INSTALL.md
- README.md
# Installation Guide
1. Get the code
git clone https://github.com/rizsotto/Bear
Downloads the entire project code from GitHub to your computer.
cd Bear
Moves into the project folder you just downloaded.
2. Rust
Medium RecommendedPrerequisites
- Git Needed to download the project code from GitHub.
- Rust (rustup) Installing via rustup also installs cargo.
cargo build --release
Compiles the Rust project.
cargo run
Builds and then immediately runs the program.
If cargo build finishes without errors, it worked. The executable is created under target/.
// repository documentation
Was this content helpful?
(0 ratings)
