MCPcopy Index your code
hub / github.com/cockpit-project/cockpit-machines

github.com/cockpit-project/cockpit-machines @349.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release 349.1 ↗ · + Follow
1,125 symbols 2,646 edges 103 files 14 documented · 1%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

cockpit-machines

This is the Cockpit user interface for virtual machines.

Technologies

  • libvirt-dbus for enumerating machines, getting status update notifications, and operations such as start/stop/delete
  • virt-install and virt-xml for creating and modifying machine definitions; both part of the virt-manager project

Development dependencies

On Debian/Ubuntu:

$ sudo apt install gettext nodejs make

On Fedora:

$ sudo dnf install gettext nodejs make

Getting and building the source

These commands check out the source and build it into the dist/ directory:

git clone https://github.com/cockpit-project/cockpit-machines
cd cockpit-machines
make

Installing

sudo make install installs the package in /usr/local/share/cockpit/. This depends on the dist target, which generates the distribution tarball.

You can also run make rpm to build RPMs for local installation.

In production mode, source files are automatically minified and compressed. Set NODE_ENV=production if you want to duplicate this behavior.

Development instructions

See HACKING.md for details about how to efficiently change the code, run, and test it.

Automated release

The intention is that the only manual step for releasing a project is to create a signed tag for the version number, which includes a summary of the noteworthy changes:

123

- this new feature
- fix bug #123

Pushing the release tag triggers the release.yml GitHub action workflow. This creates the official release tarball and publishes as upstream release to GitHub.

The Fedora and COPR releases are done with Packit, see the packit.yaml control file.

Automated maintenance

It is important to keep your NPM modules up to date, to keep up with security updates and bug fixes. This happens with dependabot, see configuration file.

Translations are refreshed every Tuesday evening (or manually) through the weblate-sync-po.yml action. Conversely, the PO template is uploaded to weblate every day through the weblate-sync-pot.yml action.

Extension points exported contracts — how you extend this code

OSInfoResources (Interface)
OSInfo
src/types.ts
HostVmsListProps (Interface)
* List of all VMs defined on this host
src/components/vms/hostvmslist.tsx
Notification (Interface)
(no doc)
src/app.tsx
VmsConfig (Interface)
(no doc)
src/config.ts
Unit (Interface)
(no doc)
src/helpers.ts
AppStateEvents (Interface)
(no doc)
src/state.ts
NetworkSpec (Interface)
(no doc)
src/libvirt-xml-create.ts
virtXmlAction (Interface)
(no doc)
src/libvirtApi/domain.ts

Core symbols most depended-on inside this repo

get_attr
called by 147
src/libvirt-xml-parse.ts
onValueChanged
called by 73
src/components/vm/disks/diskAdd.tsx
get_text
called by 53
src/libvirt-xml-parse.ts
get_child
called by 44
src/libvirt-xml-parse.ts
call
called by 43
src/libvirtApi/helpers.ts
convertToUnit
called by 39
src/helpers.ts
logDebug
called by 39
src/helpers.ts
vmId
called by 32
src/helpers.ts

Shape

Function 649
Method 220
Interface 184
Class 71
Enum 1

Languages

TypeScript95%
Python5%

Modules by API surface

src/types.ts56 symbols
src/libvirtApi/domain.ts56 symbols
src/helpers.ts50 symbols
src/libvirt-xml-parse.ts47 symbols
src/components/create-vm-dialog/createVmDialog.tsx47 symbols
src/components/vm/nics/vmNicsCard.tsx41 symbols
test/machineslib.py39 symbols
src/state.ts38 symbols
src/components/vm/consoles/vnc.tsx32 symbols
src/components/storagePools/createStoragePoolDialog.tsx25 symbols
src/components/vm/nics/nicBody.tsx24 symbols
src/components/vm/disks/diskAdd.tsx23 symbols

For agents

$ claude mcp add cockpit-machines \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page