1NPM-FUND(1)                                                        NPM-FUND(1)
2
3
4

NAME

6       npm-fund - Retrieve funding information
7
8   Synopsis
9         npm fund [<package-spec>]
10
11   Description
12       This command retrieves information on how to fund the dependencies of a
13       given project. If no package name is provided, it will list all  depen‐
14       dencies  that  are looking for funding in a tree structure, listing the
15       type of funding and the url to visit. If a  package  name  is  provided
16       then  it tries to open its funding url using the --browser config ⟨/us‐
17       ing-npm/config#browser⟩ param; if there are  multiple  funding  sources
18       for the package, the user will be instructed to pass the --which option
19       to disambiguate.
20
21       The list will avoid duplicated entries and will stack all packages that
22       share  the same url as a single entry. Thus, the list does not have the
23       same shape of the output from npm ls.
24
25   Example
26   Workspaces support
27       It's possible to filter the results to only include a single  workspace
28       and  its  dependencies  using  the  workspace  config  ⟨/using-npm/con‐
29       fig#workspace⟩ option.
30
31   Example:
32       Here's an example running npm fund  in  a  project  with  a  configured
33       workspace a:
34
35         $ npm fund
36         test-workspaces-fund@1.0.0
37         +-- https://example.com/a
38         | | `-- a@1.0.0
39         | `-- https://example.com/maintainer
40         |     `-- foo@1.0.0
41         +-- https://example.com/npmcli-funding
42         |   `-- @npmcli/test-funding
43         `-- https://example.com/org
44             `-- bar@2.0.0
45
46       And  here is an example of the expected result when filtering only by a
47       specific workspace a in the same project:
48
49         $ npm fund -w a
50         test-workspaces-fund@1.0.0
51         `-- https://example.com/a
52           | `-- a@1.0.0
53           `-- https://example.com/maintainer
54               `-- foo@2.0.0
55
56   Configuration
57   json
58       •   Default: false
59
60       •   Type: Boolean
61
62
63       Whether or not to output JSON data, rather than the normal output.
64
65       •   In npm pkg set it enables parsing set values with JSON.parse()  be‐
66           fore saving them to your package.json.
67
68
69       Not supported by all npm commands.
70
71   browser
72       •   Default: OS X: "open", Windows: "start", Others: "xdg-open"
73
74       •   Type: null, Boolean, or String
75
76
77       The browser that is called by npm commands to open websites.
78
79       Set  to  false  to  suppress browser behavior and instead print urls to
80       terminal.
81
82       Set to true to use default system URL opener.
83
84   unicode
85       •   Default: false on windows, true on mac/unix systems with a  unicode
86           locale,  as  defined  by  the LC_ALL, LC_CTYPE, or LANG environment
87           variables.
88
89       •   Type: Boolean
90
91
92       When set to true, npm uses unicode characters in the tree output.  When
93       false, it uses ascii characters instead of unicode glyphs.
94
95   workspace
96       •   Default:
97
98       •   Type: String (can be set multiple times)
99
100
101       Enable running a command in the context of the configured workspaces of
102       the current project while filtering by running only the workspaces  de‐
103       fined by this configuration option.
104
105       Valid values for the workspace config are either:
106
107       •   Workspace names
108
109       •   Path to a workspace directory
110
111       •   Path  to a parent workspace directory (will result in selecting all
112           workspaces within that folder)
113
114
115       When set for the npm init command, this may be set to the folder  of  a
116       workspace  which does not yet exist, to create the folder and set it up
117       as a brand new workspace within the project.
118
119       This value is not exported to the environment for child processes.
120
121   which
122       •   Default: null
123
124       •   Type: null or Number
125
126
127       If there are multiple funding sources, which 1-indexed  source  URL  to
128       open.
129

SEE ALSO

131       •   npm help "package spec"
132
133       •   npm help install
134
135       •   npm help docs
136
137       •   npm help ls
138
139       •   npm help config
140
141       •   npm help workspaces
142
143
144
145                                 November 2023                     NPM-FUND(1)
Impressum