Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
e82423d
feat(config): add configuration option for skip search paths
lunaluxie Jul 20, 2026
5654fd4
docs(readme): Update readme to describe the skip_paths configuration
lunaluxie Jul 20, 2026
1e44708
docs(readme): add optional directory argument to CLI summary.
lunaluxie Jul 20, 2026
da43a2b
feat(tests): add [skip_paths] config behavior test
lunaluxie Jul 20, 2026
b1737bf
docs(changelog): add [skip_paths] config option to changelog
lunaluxie Jul 20, 2026
4ec3a6a
feat(config): scan directories beyond home via [scan] extra
django23 Jul 26, 2026
26a70c3
docs: prepare v0.9.0 stable release
django23 Jul 26, 2026
d7c6af0
chore(release): bump version to 0.10.0
django23 Jul 26, 2026
6de2a16
docs(readme): correct homebrew-core version note (version-agnostic)
django23 Jul 26, 2026
1d06c89
docs,build: homebrew-core autobumps; drop retired tap tooling
django23 Jul 26, 2026
d95b4f4
docs(contributing): add concise release pipeline overview (PR → relea…
django23 Jul 26, 2026
74c3f44
chore: gitignore docs/triage (local maintainer notes)
django23 Jul 26, 2026
ef2e0da
ci: test across both macOS bash versions in a parallel matrix
django23 Jul 26, 2026
898b8f1
docs(readme): add a "What Asimov doesn't do" section
django23 Jul 26, 2026
141b015
feat(prune): add an asimov prune subcommand
django23 Jul 26, 2026
9af2353
fix(cache): survive an unreadable or unwritable cache
django23 Jul 29, 2026
db38b88
feat(doctor): add an asimov doctor subcommand
django23 Jul 29, 2026
325f62f
docs: cover upgrading from v0.3.0 and document doctor
django23 Jul 29, 2026
4637e6e
chore(lint): shellcheck the launchctl test mock (#124)
django23 Jul 29, 2026
fb7b92b
docs: release 0.11.0 (#125)
django23 Jul 29, 2026
6f09e0f
Merge branch 'main' into main
lunaluxie Jul 30, 2026
960ccb9
feat(config): fold [skip_paths] into ASIMOV_SKIP_PATHS and teach doct…
django23 Jul 30, 2026
e0f0e3e
Merge origin/main into pr-107, porting [skip_paths] to the modular la…
django23 Jul 30, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ This project adheres to [Semantic Versioning](http://semver.org/).

### Added

- `[skip_paths]` config section: name directories that Asimov should never search, alongside the built-in `~/.Trash` and `~/Library`. Thanks [@lunaluxie](https://github.com/lunaluxie)!

- `asimov doctor` now checks the data files and reports how many sentinels and fixed directories are loaded, so an incomplete install is diagnosed rather than just failing.

### Changed
Expand Down
16 changes: 15 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ If `mdfind` doesn't list your projects, the run isn't reaching them. The two usu
## Usage

```
asimov [--dry-run] [--verbose] [--quiet] [--stats] [--no-read-cache] [--no-write-cache] [--help] [--version]
asimov [--dry-run] [--verbose] [--quiet] [--stats] [--no-read-cache] [--no-write-cache] [--help] [--version] [directory]
asimov prune [--quiet]
asimov doctor [--quiet]
```
Expand Down Expand Up @@ -274,6 +274,20 @@ extra = ~/my-build-cache # plus any paths you name (always excluded when
extra = ~/golang/pkg/mod # e.g. a Go module cache under a custom GOPATH
```

### Skip parts of your home directory

Asimov never descends into `~/.Trash` or `~/Library`. Add directories of your own under `[skip_paths]` and they're left alone too - not searched, never excluded:

```ini
[skip_paths]
extra = ~/Music # one "extra =" line per directory
extra = ~/Pictures
```

This only narrows the *search*. Global caches you opted into under `[fixed_dirs]` are still excluded, even inside a skipped path.

If all your code lives in one folder, scanning just that folder (`asimov ~/Code`, see [usage](#usage)) is usually simpler than skipping everything else.

## Other install methods

**From source:**
Expand Down
5 changes: 5 additions & 0 deletions lib/asimov/config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ load_config() {
ASIMOV_CONFIG_EXTRA_SENTINELS=()
ASIMOV_CONFIG_DISABLED_SENTINELS=()
ASIMOV_CONFIG_SCAN_DIRS=()
ASIMOV_CONFIG_EXTRA_SKIP_PATHS=()

[[ -f "$ASIMOV_CONFIG_FILE" ]] || return 0

Expand Down Expand Up @@ -52,6 +53,10 @@ load_config() {
sentinels:disabled)
ASIMOV_CONFIG_DISABLED_SENTINELS+=("$value")
;;
skip_paths:extra)
value="${value/#\~/$HOME}"
ASIMOV_CONFIG_EXTRA_SKIP_PATHS+=("$value")
;;
esac
fi
done < "$ASIMOV_CONFIG_FILE"
Expand Down
8 changes: 7 additions & 1 deletion lib/asimov/data.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@ load_fixed_dirs() {
done < "$file"
}

# Load data/skip-paths.tsv into ASIMOV_SKIP_PATHS (absolute).
# Load data/skip-paths.tsv into ASIMOV_SKIP_PATHS (absolute), then append the
# paths named under [skip_paths] in the config. Both the find expression and the
# Spotlight top-up read this one array, so they cannot drift apart.
load_skip_paths() {
local file="${ASIMOV_DATA}/skip-paths.tsv"
require_data_file "$file"
Expand All @@ -74,6 +76,10 @@ load_skip_paths() {
[[ -z "$path" || "$path" == '#'* ]] && continue
ASIMOV_SKIP_PATHS+=("${ASIMOV_ROOT}/${path}")
done < "$file"

for path in ${ASIMOV_CONFIG_EXTRA_SKIP_PATHS[@]+"${ASIMOV_CONFIG_EXTRA_SKIP_PATHS[@]}"}; do
ASIMOV_SKIP_PATHS+=("$path")
done
}

# Every sentinel record in effect for this run, one "dir sentinel" pair per line:
Expand Down
6 changes: 3 additions & 3 deletions lib/asimov/doctor.sh
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ doctor_check_config() {
if [[ "$line" =~ ^\[([a-z_]+)\]$ ]]; then
section="${BASH_REMATCH[1]}"
case "$section" in
fixed_dirs|scan|sentinels) ;;
fixed_dirs|scan|sentinels|skip_paths) ;;
*)
unknown=$((unknown + 1))
doctor_problem "unknown section [${section}] in ${ASIMOV_CONFIG_FILE}"
Expand All @@ -284,11 +284,11 @@ doctor_check_config() {
key="${BASH_REMATCH[1]}"
case "${section}:${key}" in
fixed_dirs:enabled|fixed_dirs:extra|scan:extra|\
sentinels:extra|sentinels:disabled) ;;
sentinels:extra|sentinels:disabled|skip_paths:extra) ;;
*)
# A key under an already-reported section is the same fault.
case "$section" in
fixed_dirs|scan|sentinels)
fixed_dirs|scan|sentinels|skip_paths)
unknown=$((unknown + 1))
doctor_problem "unknown key '${key}' under [${section}] in ${ASIMOV_CONFIG_FILE}"
;;
Expand Down
40 changes: 40 additions & 0 deletions tests/behavior.bats
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,46 @@ load test_helper
[[ "$(count_exclusions)" -eq 0 ]]
}

@test "skips directories given in [skip_paths] config" {
write_config "[skip_paths]
extra = ~/Music"
create_project "Music/Code/First-Project" "composer.json" "vendor"
run_asimov
refute_excluded "${HOME}/Music/Code/First-Project/vendor"
[[ "$(count_exclusions)" -eq 0 ]]
}

@test "excludes the same project when [skip_paths] is absent" {
create_project "Music/Code/First-Project" "composer.json" "vendor"
run_asimov
assert_excluded "${HOME}/Music/Code/First-Project/vendor"
}

@test "[skip_paths] accepts several entries" {
write_config "[skip_paths]
extra = ~/Music
extra = ~/Pictures"
create_project "Music/First-Project" "composer.json" "vendor"
create_project "Pictures/Second-Project" "package.json" "node_modules"
create_project "Code/Third-Project" "package.json" "node_modules"
run_asimov
refute_excluded "${HOME}/Music/First-Project/vendor"
refute_excluded "${HOME}/Pictures/Second-Project/node_modules"
assert_excluded "${HOME}/Code/Third-Project/node_modules"
}

@test "[skip_paths] does not suppress fixed directories inside it" {
write_config "[fixed_dirs]
enabled = true
extra = ~/Music/build-cache

[skip_paths]
extra = ~/Music"
mkdir -p "${HOME}/Music/build-cache"
run_asimov
assert_excluded "${HOME}/Music/build-cache"
}

# =============================================================================
# Nested project handling
# =============================================================================
Expand Down
20 changes: 20 additions & 0 deletions tests/doctor.bats
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,26 @@ enabled = true"
[[ "$output" == *".config/asimov/config"* ]]
}

@test "doctor accepts a [skip_paths] section" {
write_config "[skip_paths]
extra = ~/Music"

run_asimov doctor

[[ "$status" -eq 0 ]]
[[ "$output" == *"looks valid"* ]]
}

@test "doctor flags an unknown key under [skip_paths]" {
write_config "[skip_paths]
exrta = ~/Music"

run_asimov doctor

[[ "$status" -eq 1 ]]
[[ "$output" == *"exrta"* ]]
}

@test "doctor flags an unknown config key" {
write_config "[fixed_dirs]
enbaled = true"
Expand Down
Loading