Scoop: Add a documentation for scoop export

Created on 5 Jun 2017  路  8Comments  路  Source: lukesampson/scoop

There is description, how to do scoop export, but there is not easy way, how to do scoop import / install, whatever. I've tried somethings, but nothing worked.

So this issue is basically "How to import exported list of applications?".

Thanks :)

Most helpful comment

Would be nice to have command to completely export settings (Buckets, Installet apps, Version) so on new compute you can just type import FILE and all application will be installed automatically

All 8 comments

Not sure put report here or somewhere else but: I have opened result of the export command and got this
image
in vi fom busybox package
probably its cp1251

I'm not sure why scoop export exists, to be honest. It doesn't really do anything that scoop list doesn't already do, it just does it with different formatting. Probably best to treat it as deprecated and don't rely on it for anything.

Here's how I would do an export/import. You're not guaranteed to get the same versions of apps, just the same apps at the most recent version.

# export app names to scoop-apps.txt
(scoop list) | sls '^  (\w+)' |% { $_.matches.groups[1].value } > scoop-apps.txt

# install apps from scoop-apps.txt
$apps = gc scoop-apps.txt
scoop install @apps

@mykolapolonskyi that looks like an encoding problem. PowerShell I think uses a Unicode encoding (not UTF-8 though) and vi isn't detecting that. If you did scoop export | out-file test.txt -encoding ascii and open that in vi you should be okay. However, see comments above about not using scoop export.

Ok, understand. And what about idea to use exported list of applications, including versions only to let user know on import, that there are newer versions of applications (as a notice/info)? Maybe it's not necessary as that's a concept of Scoop, so who is using it should expect that there could be newer versions...

@lukesampson I'm not getting that first command to work:

C:\Users\klauer
位  (scoop list) | sls '^  (\w+)' |% { $_.matches.groups[1].value } > scoop-apps.txt
Installed apps:

  7zip 16.04
  android-studio 3.0.0.18 [extras]
  cacert 2017-09-20
  concfg 0.2017.6.17
  coreutils 5.97.3
  ctags 5.8
  curl 7.56.1
  ffmpeg 20171102-d5995c5
  fnproject 0.4.13
  fzf 0.17.1
  gawk 3.1.7
  git 2.15.0.windows.1
  gitignore 0.2015.08.26
  gitkraken 3.2.1 [extras]
  gow 0.8.0
  gradle 4.3
  graphviz 2.38
  greenshot 1.2.10.6 [extras]
  grep 2.5.4
  gvim 8.0 *global* [extras]
  hack-font 1.4.2 *global* [extras]
  hashcat 4.0.0
  heroku-cli nightly-20171022 [extras]
  hub 2.2.9
  hugo 0.30.2
  hyper 1.4.8 [extras]
  innounp 0.46
  insomnia 5.10.1 [extras]
  jq 1.5
  kubectl 1.8.2
  less 487
  maven 3.5.2
  minikube 0.23.0
  modd 0.4
  ngrok 4VmDzA7iaHb
  nodejs 9.0.0
  notepadplusplus 7.5.1 [extras]
  nvm 1.1.5
  openjdk 1.8.0.151-1
  openssh 5.4p1-1
  openssl 1.1.0f
  oraclejdk 8u151-b12 [extras]
  packer 1.1.1
  postgresql 10.0
  python 3.6.3
  redis 3.2.100
  ripgrep 0.7.1
  rust 1.21.0
  sed 4.2.1
  shasum 0.2013.09.29
  sqlite 3210000
  sslscan 1.11.0
  sudo 0.2017.03.24
  sysinternals 2017.09.16 [extras]
  terraform 0.10.8
  up 0.3.0
  vault 0.8.3
  yarn 1.2.1
  youtube-dl 2017.10.29

C:\Users\klauer
位  cat .\scoop-apps.txt
C:\Users\klauer
位

image

Another look at the regex:

image

That's because scoop list uses Write-Host to show the list. Write-Host can't be piped to other commands. Try scoop export, it uses Write-Output

This appears to be resolved. If not, let us know. Thanks.

Would be nice to have command to completely export settings (Buckets, Installet apps, Version) so on new compute you can just type import FILE and all application will be installed automatically

Here is a version of the export command that uses scoop export

# export app names to scoop-apps.txt
(scoop export) | sls '^([\w-]+)' |% { $_.matches.groups[1].value } > scoop-apps.txt

# install apps from scoop-apps.txt
$apps = gc scoop-apps.txt
scoop install @apps
Was this page helpful?
0 / 5 - 0 ratings

Related issues

borekb picture borekb  路  3Comments

benplm picture benplm  路  3Comments

eBaeza picture eBaeza  路  3Comments

quantuumsnot picture quantuumsnot  路  3Comments

klauern picture klauern  路  3Comments