You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Read **multiline** JSON (one JSON object per line)
20
+
21
+
```ajson -m '$.name' [file.jsonl]```
22
+
23
+
**Evaluate** an expression over JSON data
24
+
25
+
```ajson 'avg($..price)' [file.json]```
26
+
23
27
# SYNOPSIS
24
28
25
-
**ajson**[_options_]_jsonpath_[_file_]
29
+
**ajson**[**-mq**]_jsonpath_[_file_]
26
30
27
31
# DESCRIPTION
28
32
29
-
**ajson** is a command-line tool for querying JSON data using JSONPath expressions. It provides a powerful way to extract specific data from JSON structures, supporting filters, wildcards, and recursive descent.
33
+
**ajson** is a command-line tool written in Go for querying and evaluating JSON data using JSONPath expressions. It reads JSON from a file or stdin and supports filters, wildcards, recursive descent, and evaluation functions such as **avg**, **sum**, **length**, **first**, **last**, and math functions.
30
34
31
-
JSONPath syntax is similar to XPath for XML, with **$** representing the root object, **.** for property access, and **[]** for array indexing or filtering.
35
+
JSONPath syntax is similar to XPath for XML, with **$** representing the root object, **.** for property access, **[]** for array indexing or filtering, and **..** for recursive descent.
32
36
33
37
# PARAMETERS
34
38
35
39
**jsonpath**
36
-
> JSONPath expression to evaluate
40
+
> JSONPath expression or evaluation string to evaluate.
37
41
38
42
**file**
39
-
> JSON file to query (reads stdin if omitted)
43
+
> Path to JSON file (reads stdin if omitted).
40
44
41
-
**-c**, **--compact**
42
-
> Compact output (no pretty printing)
45
+
**-m**, **--multiline**
46
+
> Read input as multiline JSON, where each line is a separate valid JSON object.
43
47
44
-
**-r**, **--raw**
45
-
> Output raw strings without quotes
48
+
**-q**, **--quiet**
49
+
> Do not print errors to stderr.
46
50
47
51
# CAVEATS
48
52
@@ -54,4 +58,4 @@ JSONPath implementations may vary in supported features. Complex nested queries
Copy file name to clipboardExpand all lines: assets/commands/asp.md
+61-21Lines changed: 61 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,17 +16,21 @@ Retrieve Arch Linux package build files
16
16
17
17
```asp export [package]```
18
18
19
-
**List available packages in a repository**
19
+
**List repositories** containing a package
20
20
21
-
```asp list-repos```
21
+
```asp list-repos [package]```
22
22
23
-
**Show package information**
23
+
**Show** PKGBUILD content for a package
24
24
25
25
```asp show [package]```
26
26
27
-
**Discard local changes and reset to upstream**
27
+
**View revision history** for a package
28
28
29
-
```asp update -f [package]```
29
+
```asp log [package]```
30
+
31
+
**List all locally tracked** packages
32
+
33
+
```asp list-local```
30
34
31
35
# SYNOPSIS
32
36
@@ -35,42 +39,78 @@ Retrieve Arch Linux package build files
35
39
# PARAMETERS
36
40
37
41
**checkout**_package_
38
-
> Clone a package's build files into a local directory.
39
-
40
-
**update**[_packages_]
41
-
> Update checked-out packages to latest version.
42
+
> Create a git repository with full source and history for the given package.
42
43
43
44
**export**_package_
44
-
> Copy PKGBUILD and related files to current directory.
45
+
> Dump build source files into a directory named after the package in the current directory.
45
46
46
-
**list-repos**
47
-
> List all available repositories.
47
+
**update**[_packages_]
48
+
> Track new packages or refresh existing ones from remote.
48
49
49
-
**show**_package_
50
-
> Display package information.
50
+
**show**_package_[_file_]
51
+
> Display PKGBUILD content, or a specific file if given.
52
+
53
+
**log**_package_
54
+
> Show revision history for a package.
51
55
52
56
**difflog**_package_
53
-
> Show commit history for a package.
57
+
> Show revision history with file diffs.
58
+
59
+
**shortlog**_package_
60
+
> Show condensed revision history.
61
+
62
+
**list-repos**_package_
63
+
> List repositories containing the given package.
64
+
65
+
**list-arches**_package_
66
+
> List architectures available for the given package.
67
+
68
+
**list-all**
69
+
> List all available packages.
70
+
71
+
**list-local**
72
+
> List all locally tracked packages.
73
+
74
+
**ls-files**_package_
75
+
> List source files for the given package.
76
+
77
+
**untrack**_package_
78
+
> Remove remote tracking branch from local repository.
79
+
80
+
**disk-usage**
81
+
> Report approximate disk usage for locally tracked packages.
82
+
83
+
**gc**
84
+
> Perform housekeeping to optimize and compact the local repo.
85
+
86
+
**set-git-protocol**_protocol_
87
+
> Set communication protocol (git, http, or https).
88
+
89
+
**-a**_arch_
90
+
> Use a non-default architecture.
91
+
92
+
**-h**
93
+
> Display help text.
54
94
55
-
**-f**, **--force**
56
-
> Force update, discarding local changes.
95
+
**-V**
96
+
> Show version information.
57
97
58
98
# DESCRIPTION
59
99
60
-
**asp** (Arch Source Package) is a tool for retrieving PKGBUILDs and related build files from the official Arch Linux package repositories. It provides access to the source recipes used to build packages in the core, extra, and multilib repositories.
100
+
**asp** (Arch Build Source Management Tool) manages version-controlled sources for the build scripts used to create Arch Linux packages. It provides a thin wrapper over the svntogit repositories and serves as a replacement for the older **abs** tool.
61
101
62
-
Unlike downloading PKGBUILDs manually, asp uses a Git-based backend that enables tracking changes, viewing commit history, and updating packages efficiently. Each package is a separate Git branch, making it easy to see modifications between versions.
102
+
Unlike downloading PKGBUILDs manually, asp uses a Git-based backend with sparse checkouts, enabling tracking changes, viewing commit history, and updating individual packages efficiently.
63
103
64
104
Common uses include: examining how official packages are built, modifying packages with custom options, backporting patches, and learning PKGBUILD best practices from official examples.
65
105
66
106
# CAVEATS
67
107
68
-
asp only provides build files from official Arch repositories, not the AUR. The checked-out files require **makepkg** to actually build packages. Local modifications are overwritten by **asp update -f**. Requires Git to be installed for the underlying VCS operations.
108
+
asp only provides build files from official Arch repositories, not the AUR. The checked-out files require **makepkg** to actually build packages. Requires Git to be installed for the underlying VCS operations. Package metadata is stored in **$ASPROOT** (defaults to **$XDG_CACHE_HOME/asp** or **~/.cache/asp**).
69
109
70
110
# HISTORY
71
111
72
112
The **asp** tool was created to replace the older **abs** (Arch Build System) tool, which downloaded a complete copy of all PKGBUILDs. Introduced around **2015**, asp uses Git to provide more efficient, incremental access to individual packages. It became the recommended method for obtaining official PKGBUILDs as the Arch package repositories moved to Git-based workflows.
0 commit comments