{"size": 2679, "ext": "scrbl", "max_stars_repo_path": "pkgs/racket-doc/pkg/scribblings/apis.scrbl", "max_stars_repo_name": "lkh01/racket", "max_stars_repo_stars_event_min_datetime": "2018-07-29T04:13:52.000Z", "max_stars_repo_stars_event_max_datetime": "2022-02-14T16:11:17.000Z", "max_issues_repo_path": "pkgs/racket-doc/pkg/scribblings/apis.scrbl", "max_issues_repo_name": "lkh01/racket", "max_issues_repo_issues_event_min_datetime": "2017-08-25T20:26:37.000Z", "max_issues_repo_issues_event_max_datetime": "2022-02-26T17:48:40.000Z", "max_forks_repo_path": "pkgs/racket-doc/pkg/scribblings/apis.scrbl", "max_forks_repo_name": "lkh01/racket", "max_forks_repo_forks_event_min_datetime": "2016-04-25T11:47:57.000Z", "max_forks_repo_forks_event_max_datetime": "2017-05-09T14:52:48.000Z"}
{"max_stars_count": 10, "max_issues_count": 15, "max_forks_count": 3, "avg_line_length": 47.0, "max_line_length": 100, "alphanum_fraction": 0.6980216499}
#lang scribble/manual
@(require "common.rkt"
          (for-label (except-in racket/base
                                remove)
                     racket/contract/base
                     pkg
                     pkg/lib))

@title[#:tag "apis" #:style 'toc]{Package APIs}

The @racketmodname[pkg] provides a programmatic interface to the
@exec{raco pkg} commands, but additional libraries provide smaller
building blocks and local-database support.

@local-table-of-contents[]

@section{Functions for @exec{raco pkg}}

@defmodule[pkg]

The @racketmodname[pkg] module provides a programmatic interface
to the @exec{raco pkg} sub-subcommands.

 Each-long form option of the command-line interface is a keyword
 argument to the functions described below. An argument corresponding to @DFlag{type}, @DFlag{deps},
 @DFlag{format}, @DFlag{scope}, or @DFlag{multi-clone} accepts its argument as a symbol, while
 other flags that take arguments expect strings.
 An argument corresponding to @DFlag{scope} is also allowed to be a path string,
 as would be provided to @DFlag{scope-dir}.
 Options without argument correspond to keyword arguments that
 accept booleans, where @racket[#t] is equivalent to the presence of
 the option.

@defthing[pkg-install-command procedure?]{Implements @command-ref{install}.}
@defthing[pkg-update-command procedure?]{Implements @command-ref{update}.}
@defthing[pkg-remove-command procedure?]{Implements @command-ref{remove}.}
@defthing[pkg-new-command procedure?]{Implements @command-ref{new}.}
@defthing[pkg-show-command procedure?]{Implements @command-ref{show}.}
@defthing[pkg-migrate-command procedure?]{Implements @command-ref{migrate}.}
@defthing[pkg-config-command procedure?]{Implements @command-ref{config}.}
@defthing[pkg-create-command procedure?]{Implements @command-ref{create}.}
@defthing[pkg-catalog-show-command procedure?]{Implements @command-ref{catalog-show}.}
@defthing[pkg-catalog-copy-command procedure?]{Implements @command-ref{catalog-copy}.}
@defthing[pkg-catalog-archive-command procedure?]{Implements @command-ref{catalog-archive}.
                                                  @history[#:added "6.0.17"]}
@defthing[pkg-archive-command procedure?]{Implements @command-ref{archive}.
                                                  @history[#:added "6.1.0.8"]}
@defthing[pkg-empty-trash-command procedure?]{Implements @command-ref{empty-trash}.
                                                  @history[#:added "6.1.1.6"]}

@include-section["lib.scrbl"]
@include-section["path.scrbl"]
@include-section["name.scrbl"]
@include-section["db.scrbl"]
@include-section["dirs-catalog.scrbl"]
@include-section["envvars.scrbl"]
